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[10.253.58.131:2713]]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
And the next thing is does is to fire the query on this connection; and I get following error
EXCEPTION WITH STACK TRACE FOLLOWS
java.sql.SQLException: Connection handle has been closed and is unusable
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.