5 Replies Latest reply on Jan 16, 2009 8:22 AM by mauromol

    JDBCStore and JDBCImple: connection leak?

    mauromol

      Hello!

      We have another problem with JBossTS.

      We set up the Object Store to use JDBC, so we provide our implementation of com.arjuna.ats.internal.arjuna.objectstore.jdbc.accessors.accessor that retrieves a connection to the DB used to save the Object Store data.

      When the Object Store is initialized and com.arjuna.ats.internal.arjuna.objectstore.JDBCStore.setupStore(String, String) is called (on a JDBCActionStore object), I see that the connection obtained from the accessor is saved into a com.arjuna.ats.internal.arjuna.objectstore.JDBCImple instance within the method initialise(Connection, JDBCAccess, String). More precisely, it's saved in an array called _theConnection.

      However, the connections in this array are never closed! There's just reconnect(int) that closes a connection before getting a new one.
      When shutting down the whole JBossTS, one connection remains open inside the _theConnection array of JDBCImple and I find no way to do cleanup except by implementing this feature in our implementation of the accessor (that is: tracking down given connections and closing them all at shutdown).

      Any hint to do this in a more clean way would be appreciated.

      Thank you in advance!

      Mauro.