Subject Re: [ib-support] Multiple clients with JDBC
Author Helen Borrie
At 12:26 AM 10/04/2003 +0000, you wrote:
>Hi, all. I am sure this a no-brainer, but I am new to Firebird, and I
>can't seem to find the answer in the documentation. When I try to run
>my TPC-B test on Firebird through the JDBC driver with more than one
>client thread, I get the error
>
>GDS Exception. deadlock
>update conflicts with concurrent update
>
>The URL I am using is of the form
>
>jdbc:firebirdsql:<hostname>/3050:/export/devices/fire.gdb
>
>What do I need to do to get it to support multiple clients?

This message tells you that it IS supporting multiple clients. :-)) What
you see here is the protection that transaction isolation gives to the view
of the state of the database, that each transaction has by dint of its
transaction parameters (isolation level, wait/nowait lock resolution, etc.)

A deadlock says that you have one transaction that wants to perform an
update or delete on one or more rows that another transaction is also
trying to update.

Your client application needs to respond to the deadlock in some way. A
typical response will be to roll back the transaction that causes the lock
conflict to occur; or to place its Commit call into a retry timer loop.

How you implement this depends on the capabilities of your client
application. For some ideas about this with Jaybird, subscribe to the
firebird-java list and also take a browse through the Jaybird FAQ at
www.ibphoenix.com.

heLen