I forgot to precise that I'm using servicemix 4. There's no more conf
directory. Do you where I configure the container in SMX 4?


Raphaël Delaporte wrote:
> 
> Hi,
> 
> Add autoEnlistInTransaction="true" :
> 
>   <sm:container id="jbi"
>                 rootDir="./data/smx"
>                 MBeanServer="#jmxServer"
>                 installationDirPath="./hotdeploy"
>                 monitorDeploymentDirectory="false"
>                 monitorInterval="1"
>                 transactionManager="#transactionManager"
>                 createJmxConnector="false"
>                 depends-on="jndi"
>                 autoEnlistInTransaction="true">
> 
> 
> in the conf/servicemix.xml.
> 
> Regards,
> 
> Raphaël
> 
> 
> 2010/2/4 gude <[email protected]>
> 
>>
>> For the moment I'm testing the use of XA, next I'll use two different JMS
>> broker (MQseries and OpenJMS), that's why I want XA.
>> I don't understand who enlists my JMS XAResource in the transaction, I
>> didn't find anywhere the code who does this neither in servicemix-jms,
>> nmr
>> or spring-framework.
>> I don't understand what you mean conerning the registration of XA
>> resources
>> in the JNDI registry. I thought that only the transaction manager was
>> recoverable from the JNDI properties, and the JBI container is in charge
>> to
>> do this. Then I create my XAConnection and XASessions and enlist it into
>> a
>> new created transaction. That's what I did into an other JBI container,
>> and
>> it worked.
>> It seems that there's something I didn't get...
>>
>>
>>
>> Mariusz Brylant wrote:
>> >
>> > Hi,
>> >
>> > All XA capable resources participating in the XA transaction should be
>> > enlisted  in (and looked up from) the JNDI registry. Your configuration
>> > suggests that you are actually connecting to a standalone AMQ server
>> > which does not provide JNDI registry.
>> >
>> > Would consider running AMQ deployed inside JEE container as a JCA
>> > resource.
>> >
>> > Also would suggest asking yourself  a question if you really need an
>> > overhead of the XA transactions  -  both queues  seat on the same
>> > resources (#connectionFactory), therefore native/local transaction
>> seems
>> > more appropriate.
>> >
>> > Have a look here "
>> > http://www.infoq.com/presentations/native-transactions-java-spring "
>> for
>> > some ideas.
>> >
>> > Best regards,
>> > Mario
>> >
>> > Mariusz Brylant
>> > [email protected]
>> >
>> > gude wrote:
>> >> Hello,
>> >>
>> >> I would like to receive a message from a JMS queue and send it into an
>> >> other
>> >> one inside the same XA transaction. But I have the following trace in
>> the
>> >> log, while attempting to get the input message :
>> >>
>> >> 16:11:45,323 | INFO  | tenerContainer-2 |
>> DefaultMessageListenerContainer
>> >> |
>> >> .DefaultMessageListenerContainer  750 | Setup of JMS message listener
>> >> invoker failed for destination 'queue/transactions-in' - trying to
>> >> recover.
>> >> Cause: Session's XAResource has not been enlisted in a distributed
>> >> transaction.
>> >>
>> >> my xbean.xml looks like :
>> >>
>> >> <?xml version="1.0" encoding="UTF-8" ?>
>> >>
>> >> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
>> >>         xmlns:t1="http://examples/transaction1";>
>> >>
>> >>      <jms:consumer service="t1:t1jmsreceiver"
>> >>                  endpoint="t1jmsreceiver"
>> >>                  targetService="t1:t1sendtot2"
>> >>                  targetEndpoint="t1sendtot2"
>> >>                  destinationName="queue/transactions-in"
>> >>                  connectionFactory="#connectionFactory"
>> >>                  marshaler="#consumerMarshaler"
>> >>                  synchronous="true"
>> >>                  transacted="xa"
>> >>                  sessionAcknowledgeMode="2"/>
>> >>
>> >>      <jms:provider service="t1:t1sendtot2"
>> >>                  endpoint="t1sendtot2"
>> >>                  destinationName="queue/transactions-checkpoint"
>> >>                  connectionFactory="#connectionFactory"/>
>> >>
>> >>      <bean id="connectionFactory"
>> >> class="org.apache.activemq.ActiveMQXAConnectionFactory">
>> >>          <property name="brokerURL" value="tcp://localhost:61616" />
>> >>      </bean>
>> >>
>> >>      <bean id="consumerMarshaler"
>> >> class="org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler">
>> >>          <property name="mep"
>> >> value="http://www.w3.org/2004/08/wsdl/in-only";
>> >> />
>> >>          <property name="copyProperties" value="true" />
>> >>      </bean>
>> >>
>> >> </beans>
>> >>
>> >> What should I do?
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Session%27s-XAResource-has-not-been-enlisted-in-a-distributed-transaction.-tp27452437p27455535.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Session%27s-XAResource-has-not-been-enlisted-in-a-distributed-transaction.-tp27452437p27455670.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to