db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: Does jdbc commit() return before the transaction is complete?
Date Wed, 02 Feb 2005 20:20:25 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
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.<br>
<br>
If you can monitor which thread is actually running during the lockup
period, that might help ..<br>
<br>
Satheesh<br>
<br>
Barnet Wagman wrote:
<blockquote cite="mid42013942.9050409@comcast.net" type="cite">
  <meta http-equiv="Context-Type" content="text/html; charset=us-ascii">
  <title></title>
  <title></title>
Does a return from java.sql.connection.commit() guarantee that the
transaction
is actually complete?&nbsp; Or does Derby actually finish the transaction in
the background?&nbsp; Am I correct in assuming that Derby runs in its own
thread?<br>
  <br>
I've run into a tricky problem.&nbsp; It looks as if Derby's thread may be
running and hanging&nbsp; up.&nbsp; My program stops for an over a minute<br>
at a point where nothing is happening - between the end of&nbsp; method and
its return its the calling method.&nbsp; This happens consistently at the
same point, which is shortly after a series of Derby updates that are
terminated by a connection.commit().&nbsp; (However, the same thing happens
if I run section of code in autocommit.)<br>
  <br>
Any information on Derby's threading would be appreciated.<br>
  <br>
Thanks,<br>
  <br>
bw<br>
</blockquote>
</body>
</html>

Mime
View raw message