activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: XA and setMessageListener()?
Date Mon, 26 Apr 2010 22:45:03 GMT
There needs to be some JTA wrapper on the activemq session that will start a
transaction and enlist the activemq XAResource for you. For Atomikos I think
it is something like:

    <bean id="atomikosConnectionFactory"
class="com.atomikos.jms.AtomikosConnectionFactoryBean"
        init-method="init" destroy-method="close">
        <property name="uniqueResourceName" value="activemq" />
        <property name="xaConnectionFactory" ref="xaFactory" />
    </bean>


Can you post a simple test case or your config if that is not the problem?

On 25 April 2010 12:50, Martin C. <martinc@gmx.at> wrote:

>
> Hi,
>
> I am trying to use Atomikos-based JTA together with Spring to use
> distributed transactions.
>
> Sending messages in an atomic way works fine, as the transaction is started
> before sending a message via the message producer.
>
> Unfortunately, I'm unable to get asynchronous message listeners (i.e. using
> setMessageListener()) to work, as this will fail with "Session's XAResource
> has not been enlisted in a distributed transaction." in
> ActiveMQXASession#doStartTransaction().
>
> Is it possible to have ActiveMQ automatically start a distributed
> transaction when a new message arrives or is using setMessageListener() a
> no-go when using JTA?
>
> Thanks in advance!
>
> Best regards,
> Martin
> --
> View this message in context:
> http://old.nabble.com/XA-and-setMessageListener%28%29--tp28355420p28355420.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message