4 Replies Latest reply on Jul 20, 2006 6:09 AM by Ottran 75

    To check for the unclosed connections and transaction termin

    Ottran 75 Newbie

      I have done the following in the server.xml and also uncommented the dependent in the jboss-service.xml.
      The question is how do i check for the unclosed connection will it be shown in the console or how????

      Please help....
      I am doing this since we are frequently getting No ManagedConnection problem..
      <!-- Uncomment to check for unclosed connections and transaction terminated checks
      in servlets/jsps.
      Important: You need to uncomment the dependency on the CachedConnectionManager
      in META-INF/jboss-service.xml -->

        • 1. Re: To check for the unclosed connections and transaction te
          jaikiran pai Master

          Which version of JBoss are you using? The logs will be directed to server.log file. Also, see if this helps:

          http://wiki.jboss.org/wiki/Wiki.jsp?page=CanJBossTellMeWhenIDontCloseAConnection

          • 3. Re: To check for the unclosed connections and transaction te
            jaikiran pai Master

            I just tried this out myself by uncommenting the settings in server.xml and jboss-service.xml. I created a connection in jsp and intentionally left it open. Here's what i found in the server.log(and even on the console):

            2006-07-20 14:35:45,015 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@14c7deb
            java.lang.Throwable: STACKTRACE
             at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:333)
             at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:482)
             at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
             at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
             at org.apache.jsp.testSMTPAppender_jsp._jspService(org.apache.jsp.testSMTPAppender_jsp:58)
             at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
             at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
             at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
             at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
             at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
             at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:138)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
             at java.lang.Thread.run(Thread.java:534)




            • 4. Re: To check for the unclosed connections and transaction te
              Ottran 75 Newbie

              Thanks
              Coincidently i also found out.
              Thanks for your help.

              Now I have to see what are the other ways by which no managedconnections can be avoided. It seems in our application everybody is closing the application properly