WOWebServicesClient constructor hangs entire app
WOWebServicesClient constructor hangs entire app
- Subject: WOWebServicesClient constructor hangs entire app
- From: Ramsey Gurley <email@hidden>
- Date: Mon, 16 Mar 2009 17:45:12 -0400
Hi all,
I'm working with WebServices and I have a working service, but I've
noticed that if the web service server is non-responsive, the
WOWebServiceClient constructor hangs the entire WO client app. Moving
the constructor to a separate thread did not solve the problem.
After much debugging, I tracked the problem down to a socketRead0()
native method (trace is in the attached image). Setting
-Djava.net.connectiontimeout=2
(2 seconds. Default is -1 for infinity) seemed to cure the
problem. The constructor then throws a
java.lang.IllegalArgumentException caused by a
java.net.ConnectException (connection refused). However, if I set the
timeout to 30 seconds, the original problem returns... sporadically.
Sometimes, it throws the exception as expected, sometimes it does not.
So I'm left with an app that feels like a ticking time bomb. One bad
constructor call can hang the entire instance. I'm wondering if
anyone else has seen this and knows a fix or a workaround.
Thanks everyone,
Ramsey
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden