JBoss 6 CachedConnectionManager] Closing a connection for you
gerry.matte Apr 5, 2011 9:08 PMI am attempting to implement a simple jsp application as a war in a jboss 6.0.0.Final server. I have defined a jboss mysql datasource in the deploy folder.
In my jsp application, I've created a startup servlet which which does a JNDI lookup for the datasource and saves it as a static property.
Later, a jsp page uses a session scoped javabean which retrieves the datasource from the startup servlet, opens a connection, and executes a jdbc query returning a valid resultset.
The jsp page displays correctly and I see a valid result indicating the jdbc query succeeded without errors.
However, the jboss log contains an unexpected Exception that I've never seen before:
17:19:43,781 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@65c3402b: java.lang.Throwable: STACKTRACE
at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:278) [:6.0.0.Final]
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:524) [:6.0.0.Final]
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941) [:6.0.0.Final]
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) [:6.0.0.Final]
at ca.gerrymatte.webutils.mailserver.MySessionBean.<init>(MySessionBean.java:39)
I am not using transactions so I configured the datasource type to be <no-tx-datasource> but that seems to be irrelevant.
I see that this particular Exception has cropped up many times in these forums but there does not seem to be a resolution.
Does anyone have any suggestions ?
I've attached the datasource definition, my session bean, and the startup servlet for reference.
Thanks in advance
Gerry
-
DataSourceServlet.java.zip 1.8 KB
-
MySessionBean.java.zip 1.6 KB
-
mailenable-ds.xml 1,011 bytes