[jboss-user] [Beginners Corner] - CachedConnection Manager exception
SandeepDJboss
do-not-reply at jboss.com
Wed Oct 24 11:32:55 EDT 2007
Hi,
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 at 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
EXCEPTION WITH STACK TRACE FOLLOWS
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.
Sandeep
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098382#4098382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098382
More information about the jboss-user
mailing list