3 Replies Latest reply on Sep 29, 2010 5:50 AM by veevek

    activeMQ 5.4 and JBoss 5.1 config

    benoitx

      Hi *
      We used ActiveMQ 5.3.2 with JBoss 4.0.5, Spring 2.5.5. without any problem.
      We are in the process of upgrading to JBoss 5.1 and faced a few issues with ActiveMQ as an RA.  We have upgraded to ActiveMQ 5.4.0 (just in case) but the issue is still there and I assume that we got some of our JBoss config wrong...
      We seem to be able to process the first message but the second one (and subsequent ones) fail as the thread still seem to be linked to a transaction.
      With full debug in ActiveMQ we get this:
      How can I ensure that the thread is no longer associated with a transaction (it did commit and all for the previous message).
      This is a pretty big deal for us, so any pointer would be very welcome:
      Thanks a lot
      Benoit 2010-09-01 12:34:20,425 DEBUG [ServerSessionImpl:0] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#1763e4e7-1)  Running 2010-09-01 12:34:20,425 DEBUG [ServerSessionImpl:0] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#1763e4e7-1) run loop start 2010-09-01 12:34:20,427 DEBUG [ServerSessionImpl:0] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#1763e4e7-1) Endpoint failed to process message. java.lang.RuntimeException: Endpoint before delivery notification failure at org.apache.activemq.ra.ServerSessionImpl.beforeDelivery(ServerSessionImpl.java:211) at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:827) at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:232) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637) Caused by: javax.resource.spi.ApplicationServerInternalException: Failed to begin transaction at  org.springframework.jca.endpoint.AbstractMessageEndpointFactory$AbstractMessageEndpoint.beforeDelivery(AbstractMessageEndpointFactory.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy282.beforeDelivery(Unknown Source) at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.beforeDelivery(MessageEndpointProxy.java:112) at org.apache.activemq.ra.MessageEndpointProxy.beforeDelivery(MessageEndpointProxy.java:59) at org.apache.activemq.ra.ServerSessionImpl.beforeDelivery(ServerSessionImpl.java:209) ... 6 more Caused by: javax.transaction.NotSupportedException: BaseTransaction.checkTransactionState - [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread is already associated with a transaction! at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:80) at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:65) at org.springframework.transaction.jta.SimpleTransactionFactory.createTransaction(SimpleTransactionFactory.java:57) at org.springframework.jca.endpoint.AbstractMessageEndpointFactory$TransactionDelegate.beginTransaction(AbstractMessageEndpointFactory.java:274) at org.springframework.jca.endpoint.AbstractMessageEndpointFactory$AbstractMessageEndpoint.beforeDelivery(AbstractMessageEndpointFactory.java:184) ... 18 more 2010-09-01 12:34:20,428 DEBUG [ServerSessionImpl:0] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#1763e4e7-1) run loop end 2010-09-01 12:34:20,429 DEBUG [ServerSessionImpl:0] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#1763e4e7-1) Endpoint did not release properly:  null org.apache.activemq.ra.InvalidMessageEndpointException at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.release(MessageEndpointProxy.java:159) at org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:74) at org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:263) at org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:230) at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:188) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:232) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637) 2010-09-01 12:34:20,433 DEBUG [ServerSessionImpl:0] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#1763e4e7-1) Run finished 2010-09-01 12:34:20,433 DEBUG [ServerSessionImpl:0] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#1763e4e7-1) Work completed:  javax.resource.spi.work.WorkEvent[source=org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter@7062893e]