3 Replies Latest reply on Aug 22, 2003 2:10 PM by cwl

    On CachedConnectionManager

    linatasprecise

      When run my application, JBoss CachedConnectionManager seems to close the connection automatically. It is NOT what is expected. The following msg is displayed from JBoss:

      19:41:33,419 INFO [CachedConnectionManager] Successfully closed a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@5fe9c3

      Under what occasions, JBoss will close the connection automatically ? And is it possible to configure JBoss to disable the feature of closing connection automatically ? Thanks!


        • 1. Re: On CachedConnectionManager
          jforaci

          Hi, I was told that changing the attribute from 'false' to 'true' (in META-INF/jboss-service.xml in .../deploy/jboss-jca.sar) fixes this problem. Has worked so far for me.

          • 2. Re: On CachedConnectionManager
            cwl

            Hi,

            Yes I also wanted to keep connections open between calls to my stateful session bean. I wanted to cache the ResultSet object. So was surprised that the CachedConnectionManager closed the connection on method return. I even tried bean-managed transactions to keep the transaction open across several method calls. This didn't help.

            I tried your suggestion in the jboss-jca.sar's jboss-service.xml file:



            <!-- ==================================================================== -->
            <!-- JBossCX setup, for J2EE connector architecture support -->
            <!-- The RARDeployer is needed only until xslt based deployment is written.-->
            <!-- ==================================================================== -->





            -ds.xml
            stylesheets/ConnectionFactoryTemplate.xsl
            true




            but this generated errors (attribute not found) when I started JBOSS. I'm using JBOSS V 3.2.1. Should I put a different MBean in there?

            If I can't solve this I will have to do the query on every method call :-(

            Hope someone can help

            Chris

            • 3. Re: On CachedConnectionManager
              cwl

              Argh. I put the attribute in the wrong file. For version 3.2.1 of JBOSS you need to set the "SpecCompliant" attribute to false for the CachedConnectionManager mbean entry in the file deploy/transaction-service.xml and not the jboss-service.xml file as stated earlier.

              Chris