Posted: Mon Mar 02, 2009 7:58 am Post subject: broker webservices transaction coordination
Voyager
Joined: 15 Nov 2004 Posts: 88
Hi,
I have the following scenario for MB 6.1.02
1. Message is picked from MQ
2. Processing 1
3. Invoke web service 1 (using SOAPRequest node)
4. Collect the response and Processing 2
5. Invoke web service 2
6. Collect the response and Processing 3
7. Send output to MQ.
If there is an error in step 6, then both web service 1 and web service 2 needs to be rolled back.
These web services are implemented in J2EE Spring framework and they are using JTA.
I have thought of the following two approaches:
Approach 1
1. I create a unique transaction id / obtain a transaction id from Java service
2. I pass that transaction id in my web service 1 and 2 calls
3. On successful completion of my flow I call a "Commit" operation exposed by the Java team as a web service and pass the transaction id.
4. The services commit on invocation of that operation only, else rollback at a timeout.
Approach 2
I configure the broker, MQ and WAS / JTA (not sure which one) to coordinate the transaction amongst each other.
I have read about the documentation mentioning configurations to be used for coordinating with databases. However I could not find similar stuff related to web services. I am keen on taking Approach 2 as because there is a significant issue in convincing the other teams about the "extra" services and "overhead". Is there any way we can achieve approach 2?
I did a dummy test with a web service where i called the service and got the response and then used a throw node. The flow got rolled back but the service did not rollback its operation (obviously as because it does not know that the flow has rolled back).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum