1 2 Previous Next 17 Replies Latest reply on May 19, 2003 8:47 AM by davidjencks Go to original post
      • 15. Re: serious problems with connection leaks in jboss 3.0.6
        mortonpd

        I too have had this problem with 3.0.7 and 3.2.1 with the exception:
        17:42:21,745 INFO [TxConnectionManager$TxConnectionEventListener] throwable from unregister connection
        java.lang.IllegalStateException: Trying to return an unknown connection1! org.jboss.resource.adapter.jdbc.WrappedConnection@9ed5d6
        at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:264)
        at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:550)
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManagedConnection.java:280)
        at org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnection.java:127)



        I am using a simple BMP Entity Bean accessing directly from a remote client, not another bean. The exception occurs when I go to close the connection once I am finished with it (all statements and resultset have been closed prior). When I look at the code in the CachedConnectionManager that throws the exception, when it calls key.getCMToConnectionMap() the key has null and so creates a new one, so of course the next line will always evaluate to true and throw the exception. Am I doing something wrong in order for my entity bean not to have this Collection associated with it before it enters this method?

        I eventually run out of db connections and need to restart jboss.

        The database I am running against is db2 7.2.

        • 16. Re: serious problems with connection leaks in jboss 3.0.6
          mortonpd

          Sorry this was my fault. I had originally wrote the Entity Beans for WebSphere using one of the tutorials, and they wanted you to establish the db connection in the setEntityContext and close it in the unsetEntity Context methods, where as jboss would like you to open and close them just when you actually use the connection in a method.

          Now I have removed the calls in the entity context methods it seems to be working fine.

          • 17. Re: serious problems with connection leaks in jboss 3.0.6
            davidjencks

            I'm still mystified by this. If someone can send me something I can run (for instance it uses hsqldb) that demonstrates the problem I'd really appreciate it.

            thanks
            david jencks

            1 2 Previous Next