4 Replies Latest reply on Apr 16, 2010 12:04 PM by andy.miller

    Removing the CachedConnectionManager

    andy.miller

      I would like to completely remove the cached connection manager from AS 5.1, but it seems impossible to do.  I can easily remove it from JBoss Web, but when I remove it from jca-jboss-beans.xml, the server says that the InternalManagedConnectionPool depends on it.  This dependency seems to not be defined in any -beans.xml file or any other configuration file I can find.

       

      In general, I don't want the overhead of it, so I would simply like to remove it completely.  Can anyone point me in the right direction, to where this dependency is defined?

        • 1. Re: Removing the CachedConnectionManager
          jaikiran

          Just did a quick search in AS and it looks like there's some code (org.jboss.resource.deployers.builder.ConnectionManagerBuilder) which expects this CachedConnectionManager MBean to be present.

           

          In general, I don't want the overhead of it, so I would simply like to  remove it completely

          This wiki doesn't tell whether it's OK to completely remove the CCM, but it mentions about the Debug attribute which can be switched to false http://community.jboss.org/wiki/WhatDoesTheMessageDoYourOwnHousekeepingMean. Although I think that's not what you are looking for?

          • 2. Re: Removing the CachedConnectionManager
            jaikiran

            Andrig Miller wrote:

             

            I can easily remove it from JBoss Web, but when I remove it from jca-jboss-beans.xml, the server says that the InternalManagedConnectionPool depends on it.

            Maybe just let it remain in jca-jboss-beans.xml and remove it from the EJB and JBoss Web configs? That way it won't play any role with the invocations and remove any overhead.

            • 3. Re: Removing the CachedConnectionManager
              andy.miller

              jaikiran pai wrote:

               

              Andrig Miller wrote:

               

              I can easily remove it from JBoss Web, but when I remove it from jca-jboss-beans.xml, the server says that the InternalManagedConnectionPool depends on it.

              Maybe just let it remain in jca-jboss-beans.xml and remove it from the EJB and JBoss Web configs? That way it won't play any role with the invocations and remove any overhead.

              I have removed it from deploy/jbossweb.sar/server.xml and deploy/jbossweb.sar/META-INF/jboss-beans.xml.  I also removed, what I believe is the interceptor for it from deploy/ejb3-interceptors-aop.xml, which I believe are the following two lines:

               

              <!--
                 <interceptor factory="org.jboss.ejb3.connectionmanager.CachedConnectionInterceptorFactory" scope="PER_CLASS"/>
                 -->

               

              <!--
                       <interceptor-ref name="org.jboss.ejb3.connectionmanager.CachedConnectionInterceptorFactory"/>
                       -->

               

              The first one is just sitting as a line by itself, and the second one is in the stack named EJBInterceptors.

               

              If that removes it completely, then leaving in the jca-jboss-beans.xml as a dependency is fine (although, you should be able to remove it from there too).

              • 4. Re: Removing the CachedConnectionManager
                andy.miller

                jaikiran pai wrote:

                 

                Just did a quick search in AS and it looks like there's some code (org.jboss.resource.deployers.builder.ConnectionManagerBuilder) which expects this CachedConnectionManager MBean to be present.

                 

                In general, I don't want the overhead of it, so I would simply like to  remove it completely

                This wiki doesn't tell whether it's OK to completely remove the CCM, but it mentions about the Debug attribute which can be switched to false http://community.jboss.org/wiki/WhatDoesTheMessageDoYourOwnHousekeepingMean. Although I think that's not what you are looking for?

                I already had the attribute set to turn off debug and logging.  I just want to remove it from everything.  It's really only for debugging purposes, and was really targeted at applications that use straight JDBC.  With EJB 3, and the JPA provider being Hibernate, there should be no reason that I ever have to watch for leaked connections, and this just adds overhead.