aspose file tools
The moose likes Web Services and the fly likes Transaction scope Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Transaction scope" Watch "Transaction scope" New topic
Author

Transaction scope

Pankaj Kumarkk
Ranch Hand

Joined: Apr 17, 2011
Posts: 108
How do you design a consumer which calls 2 web services from different sources and then combine results from them to give a final result.
The question is that the consumer is responsible for transaction scope. So if one of the service call fails then the other service call should be reverted.
Any help will be appreciated
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 299
1. When I read this question, I told my self it's time to read those WS-* Even if I read it, I did not really understand them.
2. I guess the what would be involved for the sake of theory.

Distributed transactions with WS-AtomicTransaction and JTA
https://www.ibm.com/developerworks/webservices/library/ws-transjta/

Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
The pattern is called compensating transaction, I believe.
Briefly, it means that if service A makes some operation B available, then it should also make an operation C available that is able to revert the effect of invoking operation B.
This way, a client of service A can call operation B and, if things fail when invoking some other operation on the same or another service, operation C to restore the state in service A as it was before the operation B was called.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transaction scope
 
Similar Threads
Transaction Scoped Persistence Contexts
Transaction scoped vs Extended persistance context
MDB transaction attribute question
Doubt on Bean Scopes
Migrating from Axis to WebSphere stack