Start XA transaction on outbound in a flow?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Start XA transaction on outbound in a flow?

Adrian Brenes-2
Hi,

I have a situation where I would like to start a transaction on outbound in a flow for different inserts in a database.
I don't want to do this on inbound since that's only a SELECT and it's used on other locations where transactions are not available.
It doesn't seems like all the outbound endpoints are handled in the same transaction session, is it possible to do this?
My config looks like:

<flow name="ilmAdd">
                        <jdbc:inbound-endpoint connector-ref="jdbcDefault" queryKey="getRows" pollingFrequency="60000">
                                <message-properties-transformer scope="outbound">
                           <add-message-property key="myProperty" value="${xxx} ${zzz}"/>
                           </message-properties-transformer>
            </jdbc:inbound-endpoint>
                        <transformer ref="myTransformer"/>
                        <component>
                                <spring-object bean="getPersonComponent" />
                        </component>
  <jdbc:outbound-endpoint connector-ref="jdbcTransaction" queryKey="ilmDeleteSystem" exchange-pattern="request-response">
  <xa-transaction action="ALWAYS_BEGIN"/>
                        </jdbc:outbound-endpoint>
  <jdbc:outbound-endpoint connector-ref="jdbcTransaction" queryKey="ilmInsertSystem" exchange-pattern="request-response">
  <xa-transaction action="ALWAYS_JOIN"/>
                        </jdbc:outbound-endpoint>
  <jdbc:outbound-endpoint connector-ref="jdbcTransaction" queryKey="ilmClearTransaction" exchange-pattern="request-response">
  <xa-transaction action="ALWAYS_JOIN"/>
                        </jdbc:outbound-endpoint>
</flow>

As you can see the inbound jdbc uses a different connector (that is not transactiontype), that's why I don't want to start the transaction there.
Is it possible to do like above? Earlier I had these outbound endpoints in a separate service and then I could start the transaction on the vm inbound but I really would like to use flows.

Thanks in advance!

/Tomas Blohm

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Start XA transaction on outbound in a flow?

Adrian Brenes-2
Anyone? For the moment I've separated the transaction part to it's own flow and call that flow from the first one but that seems like moving back to 2.x style and loosing the pros with flows.

/Tomas Blohm

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Start XA transaction on outbound in a flow?

Rajni Patel
This post has NOT been accepted by the mailing list yet.
In reply to this post by Adrian Brenes-2
Hi Adrian,

I know this is old post, but I have same requirement as you had. Did you find the solution to put two outbound-endpoint in same XA transaction?

I appreciate your reply.

Thanks in Advance.
Loading...