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

greenbean
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" />

    </bean>

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(LockSupport.java:158)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)

        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)

        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

        at java.lang.Thread.run(Thread.java:619)

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

Thanks,

Kevin


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

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
Administrator
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.