[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-dev
Subject:    [jira] Commented: (AMQ-2514) xa jta activemq jboss - xa transaction
From:       "Gary Tully (JIRA)" <jira () apache ! org>
Date:       2009-11-27 9:59:52
Message-ID: 560665524.1259315992798.JavaMail.jira () brutus
[Download RAW message or body]


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

Gary Tully commented on AMQ-2514:
---------------------------------

Think the answer is somewhere in here: \
http://static.springsource.org/spring/docs/2.5.x/reference/transaction.html from the \
AMQ perspective, all it can do is present an XA capable connection factory.  The key \
component that is missing is some wrapper around the connection factory that will \
enlist connections and sessions in the current XA transaction. This needs to be \
managed by spring in some way but it probably needs some directive or annotation to \
make this happen. In the case of jboss using CMT, jboss would provide the wrapper \
around the Activemq JMS connection factory and ensure that it is enlisted.

> xa jta activemq jboss - xa transaction not set in session
> ---------------------------------------------------------
> 
> Key: AMQ-2514
> URL: https://issues.apache.org/activemq/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
> 
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic