JTA TransactionManager implementation in sonic ESB

Posted by gkota on 14-Jun-2007 15:06

I have a question related to JTA based XA programming support in Sonic ESB. Do we have JTA TransactionManager implementation in sonic ESB to handle distributed transactions in the ESB Service or ESB Process?

I would really appreciate if anybody can answer this with a simple documentation reference .

Thanks,

Ganesh

All Replies

Posted by gkota on 10-Oct-2007 12:31

I came to know from progress sonic tech support team that there is no JTA TransactionManager implementation even in Sonic ESB7.5. In other way , if you buy Sonic BPEL Server product, you can handle commitment control with in BPEL based process implementations using compensation handler.

Posted by dmillman on 11-Oct-2007 18:59

The ESB also provides the ability to provide compensating transactions, e.g. if an ESB process is half way through and fails it is possible to catch this at the RME and take remedial action as required.

Typically the cost of performing XA is too high in a distributed environment, an alternative is maybe to create a JMS service that can use the XA apis within Sonic MQ to be part of XA transaction

Posted by gkota on 12-Oct-2007 09:25

Thanks for responding.

Functionality that we can achieve with RME based compensation handling in regular Sonic ESB process is out of transaction context and is unlike distributed Transaction processing. That is some what similar like a catch block in regular programming world. It sends that RME message part with original XQMessage as RME Multipart Message to predefined RME Endpoint.

Distributed transaction processing is common practice and is of demanding need in the integration world though the cost of resource management is too high. XA transaction involves a coordinating transaction manager, with one or more databases (or other resources, like JMS ) all involved in a single global transaction.Common scenario would be rolling back of multiple database transactions against multiple databases in predefined transactional boundaries for failure conditions.

I think that ESB process itinerary does not manage state centrally as the framework is totally relied on JMSReplyTo mechanism for process itinerary steps.I had developed processes with some what distributed transaction processing support using database commitment control. I achieved with the help of of java exception handling in my custom Java service and handle the failure conditions inside catch blocks.

I appreciate your suggestion about XA programming with SonicMQ. I never did XA based JMS programing with Sonic MQ. I would greatly appreciate if you share us the best practice to utilize that JMS XATransaction functionality with a document or some online reference.

Posted by Thomas Mercer-Hursh on 12-Oct-2007 11:51

Check out Mike Ormerod's presentations on Transactions in an SOA world for a good discussion about distributed transactions http://www.psdn.com/library/entry!default.jspa?categoryID=1379&externalID=3275

That which is possible is not always that which is best.

Posted by gkota on 12-Oct-2007 12:45

Thanks for the presentation document but I was looking for implementation related best practice document on distributed transaction processing using MQ APIs if that's best practice.

presentation is pretty high level and not much helpful for ESB developers. I already understood about compensation handler ability that we can achieve using BPEL.

I really appreciate if you can get me that reference.

Posted by dmillman on 12-Oct-2007 14:43

The information about the XA resources is in the Sonic MQ Application Programming Guide, chapter 14. Unfortunately I do not have an example with ESB using this client API.

Just for clarification, while the ESB uses JMS as a transport it is a XQMessage being sent, this includes the definition and state of the current process and as such you can perform controlled rollbacks, similar in effect to the Resubmit service that is a sample with the product. An alternative is to use a Dynamic itinerary as compensation but that is probably too much detail for here.

Posted by gkota on 12-Oct-2007 15:38

I appreciate your direct sonic documentation reference.I actually checked that mentioned document and it's located in chapter 13 on page number 441.

It highlights about SonicMQ Performing DTP without App Server's JTA Transaction Manager. That's really helpful information to produce messages in PTP and PubSub sessions under transactional control.

As far as controlled rollbacks in ESB process itinerary are concerned , I handled them inside custom ESB Java Service. I know that database connection will not committed and closed until it finishes executing process itinerary if we use ESB DBService. I am curious to learn to access all of those finished database sessions or JMS Sessions from subsequent steps later to do controlled rollback in the process itinerary with out writing a custom service and with out handling all of those steps in that service method.We can access address of process step and resubmit the message in case of resubmission but that's not equivalent to rolling back.

I'm hearing for the first time about Dynamic itinerary as compensation. I would really appreciate if you shed light on me with some reference about this also.

Posted by gkota on 25-Jun-2008 10:10

Message was edited by: GANESH KOTA

This thread is closed