In my tests no errors. In production (only with a lot of users) I encountered:

Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@7cb375d0

interpretation: over jdbc connection, a jboss connection is wrapped but the wrapper is empty. the original jdbc connection inside is no longer there. (according to the jboss5 source)

in the log I found more information above:

Closing a connection for you. Please close them yourself

interpretation: org.jboss.resource.connectionmanager.CachedConnectionInterceptor this class is charged with closing connections which it thinks are no longer needed.

So what can I do? In my test-environment I am unable to reproduce these errors.

Q1) How can I reproduce such an error in my test environment.

Q2) Will these params help (postgres) against "Connection is not associated with a managed connection"? <new-connection-sql>select 1</new-connection-sql> <check-valid-connection-sql>select 1</check-valid-connection-sql> <min-pool-size>5</min-pool-size> <max-pool-size>20</max-pool-size> <idle-timeout-minutes>10</idle-timeout-minutes>

Any ideas where to search for an answer?

I used google.

2009-05-28 11:13:37,414 [http-0.0.0.0-443-9] ERROR at.iqsoft.vokappl.web.action.LogonAction - Fatal error trying to obtain BIN for the card
at.iqsoft.vokappl.service.persistence.common.PersistenceException: Query creation error
at at.iqsoft.vokappl.service.persistence.hibernate.BinDAOHibernate.findBinByBIN(BinDAOHibernate.java:64)
at at.iqsoft.vokappl.web.action.LogonAction.logon(LogonAction.java:172)
at sun.reflect.GeneratedMethodAccessor295.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
2009-05-28 11:13:39,829 [http-0.0.0.0-443-9] ERROR net.sf.hibernate.transaction.JDBCTransaction - Begin failed
java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@7cb375d0
at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:81)
at org.jboss.resource.adapter.jdbc.WrappedConnection.getAutoCommit(WrappedConnection.java:468)
at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2252)
at at.iqsoft.vokappl.web.action.LogoffAction.logout(LogoffAction.java:53)
at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

"adrian@jboss.org" wrote:Read the FAQ. What you are doing is an anti-pattern and will cause connection leaks.

Could you point me to the specific FAQ you are referring to? I see the same problem in the Apache Day Trader application (IBM wrote it). I may have to fix the application, but I'm not that familiar with it yet.