Bitronix With Spring JmsMessageEndpointManager

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Bitronix With Spring JmsMessageEndpointManager

Bitronix With Spring JmsMessageEndpointManager

I am running in to an issue when using a Spring 3.0.3 JmsMessageEndpointManager with ActiveMQ 4.5.1 and Bitronix 2.1.

I attached a simple Spring context that I created to show my problem.  When the transactionManager attribute is included, no messages are consumed.  However, if I comment out the transactionManager property, then messages are consumed correctly.  Do you have any ideas why things appears to hang when I inject the bitronix transaction manager?

    <bean id="jmsMessageEndpointManager" class="org.springframework.jms.listener.endpoint.JmsMessageEndpointManager">

        <property name="resourceAdapter" ref="resourceAdapter" />

        <property name="activationSpec" ref="activationSpec" />

        <property name="messageListener" ref="processorBean" />

        <property name="transactionManager" ref="transactionManager" />


Also attached is a thread dump.  It shows my thread executor not doing any work.

"threadPoolExecutor-0" prio=10 tid=0x08b9f400 nid=0x216a waiting on condition [0x43750000]

   java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for  <0x67e1b6a8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

        at java.util.concurrent.locks.LockSupport.park(

        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(

        at java.util.concurrent.LinkedBlockingQueue.take(

        at java.util.concurrent.ThreadPoolExecutor.getTask(

        at java.util.concurrent.ThreadPoolExecutor$


<<spring-context.xml>> <<dump.txt>>



To unsubscribe from this list, please visit:

spring-context.xml (4K) Download Attachment
dump.txt (19K) Download Attachment
Reply | Threaded
Open this post in threaded view

Re: Bitronix With Spring JmsMessageEndpointManager

Ludovic Orban
You've configured ActiveMQ as a connector which isn't supported by BTM.

What you should do instead is configure a BTM PoolingConnectionFactory, use it directly to send your messages and wrap it in a DefaultMessageListenerContainer if you need to receive messages asynchronously.