[Logo]
Forums Register Login
JAX-WS RI 2.1 where do I put timeout code?
Hi,
I have a web service implemented with JAX-WS RI 2.1.
The service is RMI.
So when a client invokes a remote method. I send him response. Where do I put code that happens after the response was sent? Is there a timeout. So if the client died in the mean time I just reverse everything back as if the invocation never happened.

Thanks.
 
John Landon wrote:Hi,
I have a web service implemented with JAX-WS RI 2.1.
The service is RMI.


:?: What does the binary Remote Method Invocation (RMI) protocol have to do with SOAP-based JAX-WS?

Where do I put code that happens after the response was sent? Is there a timeout. So if the client died in the mean time I just reverse everything back as if the invocation never happened.


Given that it is the hosting web server that is handling the HTTP response, JAX-WS on the server may not even have any knowledge of the fact that the client never finished receiving the response. But what kind of processing do you need to do that you need to "roll back" in case the client dies? It may be worth considering splitting the call into to phases: (1) initiation of processing returning a correlation ID and (2) retrieval of result with the correlation ID. That way the client can store the correlation ID outside of its process space (for later) in case the result retrieval fails and the server doesn't have to do the processing again.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 25, 2017 00:59:18.