1 Reply Latest reply on May 6, 2005 12:09 PM by John Griffin

    Sanity check for non-jdbc connections

    John Griffin Newbie

      This concerns releasing a connection. Log tracing produced these two entries:

      12:57:02,703 TRACE [CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.NoTxConnectionManager@7d30b3, connection : com.sosstaffing.adapter.fs.api.DefaultFSResourceAdapterConnection@1a5fc52, key: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@10204ce

      12:57:20,578 TRACE [CachedConnectionManager] popped object: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@10204ce

      I assume that since the address values, @10204ce, are the same that this shows allocation and de-allocation of a resource connection. If this is true, why am I still getting the JBoss warnin that I forgot to release a connection?

      If this isn't what these entries mean then in addition to the following, what do I have to do to release a connection.

      final ConnectionEvent ce = new ConnectionEvent(this,

      These are in my ManagedConnection.close() method.

      Thanks in advance.

        • 1. Re: Sanity check for non-jdbc connections
          John Griffin Newbie

          OK, I found that the listener for the connection is not being called because it is being overwritten(?) and when the CLOSE event is sent nothing happens. I think the problem is my way of getting a connection:

          final DefaultFSResourceAdapterConnectionFactory cf =

          conn = (DefaultFSResourceAdapterConnection)cf.getConnection();

          PrintWriter log = new PrintWriter(new FileWriter("test.log", true));
          conn.setManagedConnection(new FSResourceAdapterManagedConnection(log));

          Is the conn.setManagedConnection call correct??? This appears to be where the listener is overwritten. Am I doing this incorrectly?

          Again, thanks in advance.