You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Montabert, Olivier" <ol...@hp.com> on 2005/01/31 19:27:00 UTC

Client operation call interrupt - IMPORTANT

Hi,

I have the following architecture:

Axis client stub  ------  Axis server skeleton

The client calls a synchronous operation on
the server. Let's call this operation getValue.
The server implementation of this getValue 
operation is blocking until a value is available.

This blocking call has to be interrupted in
some situations, like a client application exit.

I see two solutions to stop (interrupt) this 
client operation invocation:
- Set a timeout (different from -1) on the 
client stub. 
But in this case the Server has to detect 
when a client operation call timed-out in 
order to stop its processing and to prevent
a value loss.

- Set an infinite timeout (-1) on the client 
Stub. 
In this case the client must be able to 
interrupt this call.

Thanks for your help !

Regards,

Olivier Montabert

Re: Client operation call interrupt - IMPORTANT

Posted by Steve Loughran <st...@apache.org>.
Montabert, Olivier wrote:
> Hi,
> 
> I have the following architecture:
> 
> Axis client stub  ------  Axis server skeleton
> 
> The client calls a synchronous operation on
> the server. Let's call this operation getValue.
> The server implementation of this getValue 
> operation is blocking until a value is available.
> 
> This blocking call has to be interrupted in
> some situations, like a client application exit.
> 
> I see two solutions to stop (interrupt) this 
> client operation invocation:
> - Set a timeout (different from -1) on the 
> client stub. 
> But in this case the Server has to detect 
> when a client operation call timed-out in 
> order to stop its processing and to prevent
> a value loss.
> 
> - Set an infinite timeout (-1) on the client 
> Stub. 
> In this case the client must be able to 
> interrupt this call.

I dont think you should be blocking forever waiting for responses. not 
only do you consume resources client and server side, but things like 
proxies may have their own logic and break the connection after a period 
of time. And you'd consume sockets per held-connection on the proxy, 
which inherently has to share all its limited #of ports amongst all callers.

Better to do an API with polling.

-steve