-
1. Re: Can I disable CachedConnectionManagerMBean
jaikiran Jan 19, 2009 7:16 AM (in response to tilek) -
2. Re: Can I disable CachedConnectionManagerMBean
tilek Jan 20, 2009 5:07 AM (in response to 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 Jan 20, 2009 5:52 AM (in response to tilek)"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 Jan 21, 2009 3:56 AM (in response to 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 Jan 21, 2009 4:05 AM (in response to tilek)"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 Jan 21, 2009 4:09 AM (in response to tilek)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 Jan 21, 2009 4:33 AM (in response to 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 Jan 26, 2009 3:07 AM (in response to tilek)I should be able to help you more if I can see the code that simulated the issue.