Yes, once your commit() returns, you can be sure your transaction is complete. Derby does most of the work using the user thread that invokes a JDBC request. There are some background threads, like the postCommit thread, but these should be transparent to users.

If you can monitor which thread is actually running during the lockup period, that might help ..


Barnet Wagman wrote:
Does a return from java.sql.connection.commit() guarantee that the transaction is actually complete?  Or does Derby actually finish the transaction in the background?  Am I correct in assuming that Derby runs in its own thread?

I've run into a tricky problem.  It looks as if Derby's thread may be running and hanging  up.  My program stops for an over a minute
at a point where nothing is happening - between the end of  method and its return its the calling method.  This happens consistently at the same point, which is shortly after a series of Derby updates that are terminated by a connection.commit().  (However, the same thing happens if I run section of code in autocommit.)

Any information on Derby's threading would be appreciated.