Hello, I'm fighting with a NPE in XAPool's StandardXAConnection when having a connection error. I cause this connection error in my test case with a dead lock, which is recognized correctly, but probably not handled correctly by one of the involved components. My test involves Spring (declarative transaction management), Jencks, Tranql, XAPool and the Geronimo connector.
Actually the exception is thrown in org.tranql.connector.jdbc.PreparedStatementHandle, which informs the ConnectionHandle in the same package using connectionError(SQLException) [1]. Now it gets interesting. At the end this connection error is propagated to Geronimo's ConnectionEventListener, which causes the destruction of the ManagedXAConnection instance [2] and so the closing of the StandardXAConnection [3], which resets connectionHandle instance variable. So far so good. Unfortunately after the destruction of the connection, the transactionally demarcated method is left and Spring's transaction manager causes a rollback due to the caught exception. This brings us back to StandardXAConnection and there the end(Xid, int) method. Inside of it the connectionHandle instance variable is accessed [4], but actually already null. Now I would like to know who plays wrong in this game. Which component behaves not correctly and should be fixed? It might be difficult to say without more details, but I can probably provide more when needed. I would appreciate any help. Thanks in advance. Jörg [1] http://cvs.tranql.codehaus.org/connector/src/java/org/tranql/connector/jdbc/ConnectionHandle.java?annotate=1.5#102 [2] http://cvs.tranql.codehaus.org/connector/src/java/org/tranql/connector/jdbc/ManagedXAConnection.java?annotate=1.5#153 [3] http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/xapool/xapool/src/org/enhydra/jdbc/standard/StandardXAConnection.java?annotate=1.11#168 [4] http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/xapool/xapool/src/org/enhydra/jdbc/standard/StandardXAConnection.java?annotate=1.11#400 -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie
