Subject Active Transaction in Autocommit-Mode ?
Author Carsten Schäfer
Hi,
I'm using Firebird 1.0.3 with Jaybird 1.0.1 on WinXPSP1.
I'm getting the following exception:
java.lang.IllegalStateException: Can't destroy managed connection  with active transaction
 at org.firebirdsql.jca.FBManagedConnection.destroy(FBManagedConnection.java:334)
 at org.firebirdsql.jca.FBStandAloneConnectionManager.connectionClosed(FBStandAloneConnectionManager.java:72)
 at org.firebirdsql.jca.FBManagedConnection$1.notify(FBManagedConnection.java:1158)
 at org.firebirdsql.jca.FBManagedConnection.notify(FBManagedConnection.java:1139)
 at org.firebirdsql.jca.FBManagedConnection.close(FBManagedConnection.java:851)
 at org.firebirdsql.jdbc.FBConnection.close(FBConnection.java:568)
 at com.TTC_Informatik.PAULA.server.App_Server.abmelden(App_Server.java:3459)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
 at sun.rmi.transport.Transport$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Unknown Source)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
 
when closing a connection.
My problem: this connection is only used in autocommit mode (only read-connection), so i thought i don't have to commit explicit.
I think this only happens when i use the same connection from different threads (but with no other sql-error).
 
After that error occurs i see with gstat that oldest transaction and oldest active are not moving any more only next transaction is moving, even when i call commit after i catch the exception and then close the connection.
Why is this happening ?
 
mfg
Carsten