0
votes

Hi I have three flows set up to accept a message from a http inbound endpoint, send to a VM endpoint and again to various other VM endpoints while eventually being sent to a JMS outbound endpoint.

I need to configure transactionality between these connectors and I am using xa-transaction actions with my JMS endpoint having <jms:transaction action="ALWAYS_JOIN" />configured. This doesn't seem to be working as when a message comes in on the http inbound endpoint and goes to the first VM endpoint I get


Message : Can not start XA transaction

Code : MULE_ERROR-95

Exception stack is: 1. Object of type "javax.transaction.TransactionManager" with name "Transaction Manager" is not available in the registry (java.lang.IllegalStateExcep tion) org.mule.transaction.XaTransaction:56 (null) 2. Can not start XA transaction (org.mule.api.transaction.TransactionException) org.mule.transaction.XaTransactionFactory:37 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transaction/TransactionException.html)


Root Exception stack trace: java.lang.IllegalStateException: Object of type "javax.transaction.TransactionManager" with name "Transaction Manager" is not available in the registr y at org.mule.transaction.XaTransaction.doBegin(XaTransaction.java:56) at org.mule.transaction.AbstractTransaction.begin(AbstractTransaction.java:65) at org.mule.transaction.XaTransactionFactory.beginTransaction(XaTransactionFactory.java:32) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)


My flow is defined below.

    <http:inbound-endpoint address="${test.service.proxy}"
                           transformer-refs="xmlToDom">
    </http:inbound-endpoint>
    <logger level="INFO" message="#[flow.name]: #[payload] #[message]" doc:name="Logger"/>
    <vm:outbound-endpoint path="receiveMessageStage2VM">
        <xa-transaction action="ALWAYS_BEGIN"/>
    </vm:outbound-endpoint>
</flow>

<flow name="ReceiveMessageStage2Idempotency">
    <vm:inbound-endpoint path="receiveMessageStage2VM">
        <xa-transaction action="ALWAYS_JOIN"/>
    </vm:inbound-endpoint>
    <pooled-component>
        <spring-object bean="receiveMessageIdempotentComponent"/>
        <binding interface="en.test.mf.doc.components.SyncSender">
            <vm:outbound-endpoint path="receiveMessageStage3VM">
                <xa-transaction action="ALWAYS_JOIN"/>
            </vm:outbound-endpoint>
        </binding>
    </pooled-component>
</flow>

<flow name="ReceiveMessageStage3Idempotency">

    <vm:inbound-endpoint path="receiveEVRMessageStage3VM"
                         responseTransformer-refs="jmsToString">
        <xa-transaction action="ALWAYS_JOIN"/>
    </vm:inbound-endpoint>
    <component>
        <spring-object bean="zipFileMessageHandler"/>
    </component>
    <logger level="INFO" message="#[flow.name]: #[payload] #[message]" doc:name="Logger"/>
    <outbound-endpoint ref="JMS_outbound_endpoint"
                       doc:name="JMS_outbound_endpoint"/>
</flow>

Anyone know how I can achieve this functionality?

1

1 Answers