2 Replies Latest reply on Jul 7, 2009 8:58 AM by tarek_supertallal

    Using JMS in a transactional context

    fouquet.f

      Hi everyone,

      I'm using the last version of servicemix but I'm having some problems with jms transactions. Through the internet there are lots of different samples explaining how to create a Connection factory with a transaction manager but they are all for the previous versions of smx. There are samples using the org.apache.activemq.pool.PooledConnectionFactoryBean, other using the org.apache.activemq.pool.PooledConnectionFactory (what's the difference?), other using jencks.....

       

      Actually in my spring xml file I'm doing the following:

      // My JMS consumer

       

       

      and I have the following error message :

       

      java.lang.IllegalStateException: Already value for key [org.apache.activemq.pool.XaPooledConnectionFactor

      1a7473a] bound to thread

              at org.springframework.transaction.support.TransactionSynchronizationManager.bindResource(TransactionSynchronizationManager.java:182)

              at org.springframework.transaction.support.ResourceHolderSynchronization.resume(ResourceHolderSynchronization.java:55)

       

      So I?m looking for a sample code using the JMS with XA to understand what I'm doing wrong.

       

      Thanks,