views:

43

answers:

1

We have a few products that communicate using various forms of web services. Some use straight XML passed through http requests (HttpClient). Others make remote EJB calls and some use EJB 3 web services on EJB session bean methods. In the HttpClient versions we have problems where the remote end takes 10+ minutes to complete a database operation and the caller times out. The caller does not know at that point whether or not the data made it on the remote end. Sometimes we'll be left with data inserted on the remote end but the caller times out and rolls back since it can't be sure about the status.

I understand that de-coupling these two and putting a messaging layer like JMS in between would allow us to guarantee delivery and to not block, but then we'd have to write a lot of extra code to check whether or not the transaction made it or failed on the remote end. This is definitely an option, but are there any good solutions to writing this where there is a handshake between the two ends, where the entire transaction will fail whether it's due to an exception, timeout or networking issue, and where at the end of the interaction between the two apps both will know for sure whether the transaction as a whole was successful or failed? Is the only / best option for this remote EJB sessionbean method calls?

+1  A: 

Sounds like you need a WS-AT implementation. Read the discussion at http://stackoverflow.com/questions/434950/transaction-rollback-and-web-services

Jonathan Halliday
Thanks for the info, that looks like something we could really use.