[ 
https://issues.apache.org/jira/browse/AMQ-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812177#comment-13812177
 ] 

Claus Ibsen commented on AMQ-2514:
----------------------------------

Try with 5.9 release where the JCA RAR has been improved a lot and tested on 
JBoss AS etc.

> xa jta activemq jboss - xa transaction not set in session
> ---------------------------------------------------------
>
>                 Key: AMQ-2514
>                 URL: https://issues.apache.org/jira/browse/AMQ-2514
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: JBossTS 4.2.3 SP5, activemq 5.3.0, jdk1.6.0_16, winxp, 
> spring 2.5.6, hp desktop
>            Reporter: Miten Mehta
>             Fix For: 5.x
>
>
> JBoss based global transaction does not work with active mq.  The session for 
> say jms though is ActiveMQXASession getting created but its transaction 
> related values are not set at all due to which even after retrieving the 
> message it fails after doing check for whether its transaction context is set 
> or not.  It will give JMS Exception as "Session's XAResource has not been 
> enlisted in a distributed transaction.".
> You can find the thread on nabble at:
> http://old.nabble.com/xa-jta-activemq-jboss-td26515685.html#a26527052
> Note that I have also set the cacheLevel in config below which by default is 
> set with same value in 2.5.6 api.  Setting cache level does not resolve the 
> issue.  The nabble message thread has the earlier configs if one wants to 
> read in complete.
> <?xml version="1.0" encoding="UTF-8"?>
> <beans 
>   xmlns="http://www.springframework.org/schema/beans";
>   xmlns:util="http://www.springframework.org/schema/util";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>                       http://www.springframework.org/schema/util 
> http://www.springframework.org/schema/util/spring-util-2.0.xsd";
>   >
>   
>  
> <!-- this is the Message Driven POJO (MDP) -->
> <bean id="myMessageListener" class="jmsexample.ExampleListener" />
> <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
>     <property name="environment">
>       <props>
>         <prop key="java.naming.factory.initial">
>           jmsexample.jndi.ActiveMQInitialContextFactory
>         </prop>
>         <prop key="queue.TEST.Q1">
>           TEST.Q1
>         </prop>
>        
>         <prop key="brokerURL">
>            tcp://localhost:61616
>         </prop>
>       </props>
>     </property>
>   </bean>
>  <bean id="appJmsDestination"
>     class="org.springframework.jndi.JndiObjectFactoryBean">
>     <property name="jndiTemplate">
>       <ref bean="jndiTemplate"/>
>     </property>
>     <property name="jndiName" value="TEST.Q1"/>
>   </bean>
>  
>  <bean id="connectionFactory"
>     class="org.springframework.jndi.JndiObjectFactoryBean">
>     <property name="jndiTemplate">
>       <ref bean="jndiTemplate"/>
>     </property>
>     <property name="jndiName" value="ConnectionFactory"/>
>   </bean>
>  
> <bean id="jmsContainer" 
> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>     <property name="connectionFactory" ref="connectionFactory"/>
>     <property name="destination" ref="appJmsDestination"/>
>     <property name="messageListener" ref="myMessageListener" />
>     <property name="transactionManager" ref="transactionManager"/>
>    <property name="cacheLevel">
>       <util:constant 
> static-field="org.springframework.jms.listener.DefaultMessageListenerContainer.CACHE_NONE"
>  />
>     </property>
> </bean>
>  
>  <bean id="jbossTransactionManager"
>     
> class="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple">
>   </bean>
>   <bean id="jbossUserTransaction"
>     
> class="com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple"/>
>   <bean id="transactionManager"
>     class="org.springframework.transaction.jta.JtaTransactionManager">
>     <property name="transactionManager">
>       <ref bean="jbossTransactionManager" />
>     </property>
>     <property name="userTransaction">
>       <ref bean="jbossUserTransaction" />
>     </property>
>   </bean>
>    
> </beans> 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to