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 Jens Schumann <je...@void.fm> on 2003/03/24 10:08:19 UTC

Socket Timeouts for Axis Clients

As a follow up to the "HTTP Connection Hang" discussion and my "SOTimeout"
post on axis-user here a few thoughts:

Some broken load balancers in our network configuration caused hanging
connections calling WebServices using Axis Clients (1.1RC2). Since the
generated Axis Client Code does not set a default socket timeout the calling
thread was blocking forever, something which wasn't as obvious as it could
be. A default socket timeout would have been wonderful ;)

With the current client code I am unable to set the socket timeout directly,
so I need to alter the generated code to set a socket timeout for the
underlying HttpSender. You may argue easy to fix, but there is another
problem: The client code throws RemoteExceptions (and AxisFaults) only, so I
am unable to treat local and remote failures differently. Analyzing Axis
fault Strings isn't the best way to implement Exception handling.


I am somewhat short on time and thus being said I hope someone else might be
able to implement the following changes ;(.


1. Set default socket timeout for Axis Clients to 30 or 60 seconds.
2. Generate code which allows to set the socket timeout for the axis client
easily.
3. Add a local exception (IOException?) to the exposed web service
operations to allow better handling of local (socket) exceptions.


I think 1 & 2 should be easy to fix, but 3 will break backwards
compatibility.

Jens


Re: Socket Timeouts for Axis Clients

Posted by Steve Loughran <st...@iseran.com>.
Jens Schumann wrote:
> As a follow up to the "HTTP Connection Hang" discussion and my "SOTimeout"
> post on axis-user here a few thoughts:

> I am somewhat short on time and thus being said I hope someone else might be
> able to implement the following changes ;(.
> 

It doesnt usually work that way, does it. but file a report.

> 
> 1. Set default socket timeout for Axis Clients to 30 or 60 seconds.

easy, though not to set the connect timeout as that is 1.4 only

> 2. Generate code which allows to set the socket timeout for the axis client
> easily.

moderately easy; we want to this cleanly. Perhaps a property or something

> 3. Add a local exception (IOException?) to the exposed web service
> operations to allow better handling of local (socket) exceptions.
> 
> 
> I think 1 & 2 should be easy to fix, but 3 will break backwards
> compatibility.

Then it isnt possible. Instead you'll need to turn an IOE into an 
RmiException, somehow.




Re: Socket Timeouts for Axis Clients

Posted by Jens Schumann <je...@void.fm>.
On 3/24/03 02:21 PM Davanum Srinivas <di...@yahoo.com> wrote:

> Added this note as a bug report in Bugzilla
> (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18277).
> 

I take this as an "agreed" ;). Thanks.


Re: Socket Timeouts for Axis Clients

Posted by Davanum Srinivas <di...@yahoo.com>.
Added this note as a bug report in Bugzilla
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18277). 

Thanks,
dims

--- Jens Schumann <je...@void.fm> wrote:
> As a follow up to the "HTTP Connection Hang" discussion and my "SOTimeout"
> post on axis-user here a few thoughts:
> 
> Some broken load balancers in our network configuration caused hanging
> connections calling WebServices using Axis Clients (1.1RC2). Since the
> generated Axis Client Code does not set a default socket timeout the calling
> thread was blocking forever, something which wasn't as obvious as it could
> be. A default socket timeout would have been wonderful ;)
> 
> With the current client code I am unable to set the socket timeout directly,
> so I need to alter the generated code to set a socket timeout for the
> underlying HttpSender. You may argue easy to fix, but there is another
> problem: The client code throws RemoteExceptions (and AxisFaults) only, so I
> am unable to treat local and remote failures differently. Analyzing Axis
> fault Strings isn't the best way to implement Exception handling.
> 
> 
> I am somewhat short on time and thus being said I hope someone else might be
> able to implement the following changes ;(.
> 
> 
> 1. Set default socket timeout for Axis Clients to 30 or 60 seconds.
> 2. Generate code which allows to set the socket timeout for the axis client
> easily.
> 3. Add a local exception (IOException?) to the exposed web service
> operations to allow better handling of local (socket) exceptions.
> 
> 
> I think 1 & 2 should be easy to fix, but 3 will break backwards
> compatibility.
> 
> Jens
> 


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com