Question

I'm currently working on a SOA project.

I have to develop several processing chains, that is to say a web-services that chain web-services inside an ESB in Java.

Since every web-service to chain can throw different exception, I thought about using Transactions to be able to rollback the web-services behaviors.

However, I have no idea if this is even possible in an SOA environnement when every service is different. I searched it and found some information about AtomicTransactions but I'm not sure it's can be used to solve my problem.

To conclude, my questions are is it actually possible to rollback services? And if so, how can I set it up?

Thanks in advance.

Was it helpful?

Solution

Using transactions between services is not a good practice as you're holding up resources for components that are not necessarily trustworthy, plus service processes are usually long-running (I wrote about it more in "transactional-integration anti-pattern".

As someone mentioned in a comment I find that the "saga pattern" is a better way to handle these long running interactions

OTHER TIPS

I find the whole idea bad at best. SOA and transactions has always been a huge headache. Advocating the reverse action of a set of services, can ALSO fail! What would you do then?

I know of a very reputable media company in the UK, that has a dedicated offshore team, massaging data, due to orchestration failures across web services, which, boggles the mind.

Finally, with OEM BPM engines as orchestrators I think there might be a capability to rely on for a Unit of Work concept. However, this topic has been and amazingly is still an issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top