You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Thomas Recloux <th...@gmail.com> on 2008/07/15 17:27:36 UTC

Transaction problem

Hi;

I've got a transaction problem with servicemix 3.2.1, I have created a small
example in order to simplify my problem.

A JMS consumer is reading messages from an ActiveMQ instance, the message is
routed to a jms producer which writes the message in an other ActiveMQ
instance.

If a problem occurs during the process, the message must not be lost and
should be persisted in order to be submitted again.

I've read the transaction page (
http://servicemix.apache.org/transactions.html ) and I've added the
synchronous="false" attribute on my JMS consumer and the only activated flow
in Servicemix is the JCA Flow.

When the destination activemq instance is down, ServiceMix prints this
exception and the message seems to be lost (I've browsed internal queues).

javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:62616. Reason: java.net.ConnectException: Connection
refused: connect
       at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:33)
[cut]
        at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:533)
[cut]
ERROR - JCAFlow                        - Caught an exception unpacking JMS
Message:
javax.jms.JMSException: Failed to build body from bytes. Reason:
java.io.IOException: org.springframework.jms.UncategorizedJmsException
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:33)
        at
org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:515)
        at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:129)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121)
        at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:696)
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException:
org.springframework.jms.UncategorizedJmsException
        at
org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:168)
        ... 9 more


Can someone help me ?


-- 
Thomas Recloux