Subject | Commit fails if nothing has been done since last commit |
---|---|
Author | Erik Erskine |
Post date | 2002-03-19T16:32:01Z |
I'm getting the following error if I try and commit a transaction when
nothing has been done since the last commit/rollback.
The code looks like this:
// sql operations
con.commit(); // works fine
con.setAutoCommit(false);
con.commit(); // fails
con.setAutoCommit(false);
The exception is:
java.sql.SQLException: javax.resource.ResourceException: couldn't commit
local transaction: javax.transaction.xa.XAException
at org.firebirdsql.jdbc.FBConnection.commit(FBConnection.java:358)
What I have done works fine with Interclient, is this valid SQL? If
not, is there an easy way to test whether a commit/rollback is necessary?
thanks,
Erik
/--------------------------------------------------------------------\
| Erik Erskine erik@... |
| Sundayta Ltd |
\--------------------------------------------------------------------/
nothing has been done since the last commit/rollback.
The code looks like this:
// sql operations
con.commit(); // works fine
con.setAutoCommit(false);
con.commit(); // fails
con.setAutoCommit(false);
The exception is:
java.sql.SQLException: javax.resource.ResourceException: couldn't commit
local transaction: javax.transaction.xa.XAException
at org.firebirdsql.jdbc.FBConnection.commit(FBConnection.java:358)
What I have done works fine with Interclient, is this valid SQL? If
not, is there an easy way to test whether a commit/rollback is necessary?
thanks,
Erik
/--------------------------------------------------------------------\
| Erik Erskine erik@... |
| Sundayta Ltd |
\--------------------------------------------------------------------/