Hi Same issue happens with ActiveMQ 5.4.0 and JBoss 5.1; Spring 2.5.5
This is a major hurdle for us; we can debug/try to find the issue with some guidance... A full ra.xml example (article/blog) with JBoss 5.1 would be very useful. I note that the ActiveMQ website only mentions that it was tested with JBoss 4.x... is this a known issue? I enclose our ra.xml and broker config. The application-ra.jar is then packaged up in an EAR file. It all worked fine with JBoss 4.0.5. First message is processed ok, second message, the thread says this: 2010-09-01 10:19:25,076 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#7cb73752-1) Work accepted: javax.resource.spi.work.workevent[source=org.springframework.jca.work.simpletaskworkmanager$delegatingworkadap...@7d5103e7] 2010-09-01 10:19:25,076 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#7cb73752-1) Work started: javax.resource.spi.work.workevent[source=org.springframework.jca.work.simpletaskworkmanager$delegatingworkadap...@7d5103e7] 2010-09-01 10:19:25,076 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#7cb73752-1) Running 2010-09-01 10:19:25,076 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#7cb73752-1) run loop start 2010-09-01 10:19:25,091 INFO [org.apache.activemq.ra.ServerSessionImpl:1] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#7cb73752-1) Endpoint failed to process message. Reason: Endpoint before delivery notification failure 2010-09-01 10:19:25,091 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#7cb73752-1) run loop end 2010-09-01 10:19:25,093 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#7cb73752-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) Any help / guidance would be very welcome Thanks Benoit ------------------------IMPORTANT NOTICE This communication contains information that is considered confidential and may also be privileged . It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender and delete the original. ________________________________ From: Benoit Xhenseval <beno...@yahoo.com> To: users@activemq.apache.org Sent: Tue, August 31, 2010 9:51:43 PM Subject: Jboss 5.1 and ActiveMQ 5.3.2: Endpoint did not release properly: null Hi *, We're in the process of upgrading from JBoss 4.0.5.GA to 5.1.0.GA. Changes were minimal BUT we're facing an issue with ActiveMQ deployed as an embedded broker via RA. The enclosed settings work fine with Jboss 4.0.5. The first message is received correctly but after that we seem to be unable to process any further message. I am aware of https://issues.apache.org/activemq/browse/AMQ-2670 but this does not seem to apply in our case as we used this ra.xml: <outbound-resourceadapter> <connection-definition> <!-- JMS 1.1 --> <managedconnectionfactory-class>org.apache.activemq.ra.ActiveMQManagedConnectionFactory</managedconnectionfactory-class> <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface> <connectionfactory-impl-class>org.apache.activemq.ra.ActiveMQConnectionFactory</connectionfactory-impl-class> <connection-interface>javax.jms.Connection</connection-interface> <connection-impl-class>org.apache.activemq.ra.ManagedConnectionProxy</connection-impl-class> </connection-definition> <connection-definition> <!-- JMS 1.0/1.1 --> <managedconnectionfactory-class>org.apache.activemq.ra.ActiveMQManagedConnectionFactory</managedconnectionfactory-class> <connectionfactory-interface>javax.jms.QueueConnectionFactory</connectionfactory-interface> <connectionfactory-impl-class>org.apache.activemq.ra.ActiveMQConnectionFactory</connectionfactory-impl-class> <connection-interface>javax.jms.QueueConnection</connection-interface> <connection-impl-class>org.apache.activemq.ra.ManagedConnectionProxy</connection-impl-class> </connection-definition> <connection-definition> <!-- JMS 1.0/1.1 --> <managedconnectionfactory-class>org.apache.activemq.ra.ActiveMQManagedConnectionFactory</managedconnectionfactory-class> <connectionfactory-interface>javax.jms.TopicConnectionFactory</connectionfactory-interface> <connectionfactory-impl-class>org.apache.activemq.ra.ActiveMQConnectionFactory</connectionfactory-impl-class> <connection-interface>javax.jms.TopicConnection</connection-interface> <connection-impl-class>org.apache.activemq.ra.ManagedConnectionProxy</connection-impl-class> </connection-definition> <!-- XA support! Critical --> <transaction-support>XATransaction</transaction-support> <!-- but not used @ the moment --> <authentication-mechanism> <authentication-mechanism-type>BasicPassword</authentication-mechanism-type> <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface> </authentication-mechanism> <reauthentication-support>false</reauthentication-support> </outbound-resourceadapter> The log file shows something along the line of "Endpoint did not release properly: null" What could cause this? Is there an example somewhere with JBoss 5.1 and ActiveMQ 5.3.2? Thanks, all examples I have seen seem to be old. See: ------ 19:01:06,590 DEBUG [AMQMessageStore] Doing batch update... adding: 1 removing: 0 19:01:06,590 DEBUG [Queue] queue.stage_trade_data toPageIn: 1, Inflight: 0, pagedInMessages.size 0, enqueueSize: 1 19:01:06,590 DEBUG [KahaReferenceStore] queue.stage_trade_data add: ID:WLDNTECC018024L-4159-1283275933801-4:0:1:2:1 19:01:06,590 DEBUG [AMQMessageStore] adding message ref:ID:WLDNTECC018024L-4159-1283275933801-4:0:1:2:1 19:01:06,590 DEBUG [AMQMessageStore] Batch update done. 19:01:06,590 DEBUG [AMQMessageStore] flush starting ... 19:01:06,590 DEBUG [AMQMessageStore] flush starting ... 19:01:06,590 DEBUG [ServerSessionPoolImpl] ServerSession requested. 19:01:06,590 DEBUG [ServerSessionPoolImpl] Using idle session: ServerSessionImpl:0 19:01:06,590 DEBUG [ServerSessionImpl:0] Starting run. 19:01:06,590 DEBUG [ServerSessionImpl:0] Work accepted: javax.resource.spi.work.WorkEvent[source=org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAda p...@d7759] 19:01:06,590 DEBUG [ServerSessionImpl:0] Work started: javax.resource.spi.work.WorkEvent[source=org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdap t...@d7759] 19:01:06,590 DEBUG [ServerSessionImpl:0] Running 19:01:06,590 DEBUG [ServerSessionImpl:0] run loop start 19:01:06,590 INFO [ServerSessionImpl:0] Endpoint failed to process message. Reason: Endpoint before delivery notification failure 19:01:06,590 DEBUG [ServerSessionImpl:0] run loop end 19:01:06,590 DEBUG [ServerSessionImpl:0] 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:619) 19:01:06,590 DEBUG [ServerSessionImpl:0] Run finished 19:01:06,590 DEBUG [ServerSessionImpl:0] Work completed: javax.resource.spi.work.WorkEvent[source=org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAd ap...@d7759] 19:01:08,027 DEBUG [InactivityMonitor] 10000 ms elapsed since last write check. 19:01:08,027 DEBUG [InactivityMonitor] 30000 ms elapsed since last read check. 19:01:08,496 DEBUG [InactivityMonitor] 10000 ms elapsed since last write check. 19:01:17,559 DEBUG [AMQPersistenceAdapter] Checkpoint started. 19:01:17,559 DEBUG [AMQPersistenceAdapter] Marking journal at: offset = 47128, file = 1, size = 24148, type = 1 19:01:17,559 DEBUG [AMQPersistenceAdapter] Checkpoint done. 19:01:18,027 DEBUG [InactivityMonitor] 10000 ms elapsed since last write check. 19:01:18,496 DEBUG [InactivityMonitor] 10000 ms elapsed since last write check. Thanks a lot Benoit