0 Replies Latest reply on Oct 24, 2007 11:32 AM by Sandeep Dhamale

    CachedConnection Manager exception

    Sandeep Dhamale Newbie


      I am using jboss-5.0.0.Beta2; I have recently migrated my application from weblogic to JBoss; I have been facing a strange issue.
      This code works in production for weblogic; so I can believe it can be a problem with code.

      I am using JBOSS connection pooling for connecting to database. It looks JBoss is closing some connections on its own throwing below exception:-
      [200710281:043148][WorkerThread#0[]]com.ssp.tbo.fw.record.ThinCursorServer.removeOpenCursor:201> Removed cursor key 106973.2.2

      2007-10-08 04:31:48,216 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@15facb0

      java.lang.Throwable: STACKTRACE

      at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)

      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:415)

      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)

      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)

      And the next thing is does is to fire the query on this connection; and I get following error


      java.sql.SQLException: Connection handle has been closed and is unusable

      at org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:537)

      at org.jboss.resource.adapter.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:524)

      at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:142)

      This is very strange behavior.. Why JBOSS closes the connections so early. We do close it pro grammatically when we are done with the connection. It all happens in very short period of time so JBOSS ideally should not close the connections.

      This is irregular behavior as next time you fire a query it may work; and after couple of more attempts you may get to the same exception.

      Any light on above exception would be greatly appreciated....

      Thanks so much.