8 Replies Latest reply on Jan 26, 2009 3:07 AM by vickyk

    Can I disable CachedConnectionManagerMBean

    tilek

      I known the way to disable it but I am not sure, it have any side effect if it is disabled.

      Could you please explain me?
      1. What is a responsibility of CachedConnectionManager?
      2. What happen when it is disable?

      Thanks

        • 1. Re: Can I disable CachedConnectionManagerMBean
          jaikiran
          • 2. Re: Can I disable CachedConnectionManagerMBean
            tilek

            Thank a lot for your response.

            Is CachedConnectionManager optional component?

            If I understand correctly, the responsibity of CachedConnectionManager is
            1. Close unused connection after transaction finish.
            2. Lazy transaction enlistment.

            If I wouldn't like those feature, can I disable it?

            Thanks

            • 3. Re: Can I disable CachedConnectionManagerMBean
              vickyk

               

              "tilek" wrote:

              If I wouldn't like those feature, can I disable it?
              Thanks

              Yes however I am able to understand what substantial benefit are you going to get by knocking off the CCM.

              • 4. Re: Can I disable CachedConnectionManagerMBean
                tilek

                Thanks for your response, It's very helpful.

                I would like to disable it becuase the lazy enlistment feature inconsistent with spring transaction for inner transactional.

                Scenario
                1. Begin outer transaction by spring aop.
                2. Get connection, the connection is enlisted to outer transaction.
                3. Begin inner transaction by spring aop.
                4. CCM try to enlist the same connection to the inner transaction again. It throw an exception "Trying to change transaction [...] in enlist.

                If I purely use JBoss transaction, can you explain me how the JBoss notify CCM when it has an inner transactional. Does it push a new MetaAwareObject to local stack or do something else? I will report an issue to Spring.

                Thanks

                • 5. Re: Can I disable CachedConnectionManagerMBean
                  vickyk

                   

                  "tilek" wrote:

                  Scenario
                  1. Begin outer transaction by spring aop.
                  2. Get connection, the connection is enlisted to outer transaction.
                  3. Begin inner transaction by spring aop.
                  4. CCM try to enlist the same connection to the inner transaction again. It throw an exception "Trying to change transaction [...] in enlist.

                  Looks to me that you have nested TX which is not supported, not sure why you are not getting the error when you are starting the nested tx may be spring code is hiding the error.
                  spring should suspend the outer TX before starting the inner TX.


                  • 6. Re: Can I disable CachedConnectionManagerMBean
                    vickyk

                    Also if you are using xa-datasource you could enable track-connection-by-tx in it, the error should go.

                    • 7. Re: Can I disable CachedConnectionManagerMBean
                      tilek

                      I'm afraid, I use local-tx-transaction.

                      I tracked into spring code, I'm sure it suspend outer TX before begin inner TX.

                      But I think, JBoss may be do extra work to notify CCM about inner transactional and spring should do the same way.

                      However, I don't known that :-(.

                      Thanks

                      • 8. Re: Can I disable CachedConnectionManagerMBean
                        vickyk

                        I should be able to help you more if I can see the code that simulated the issue.