I've been playing with asynchronous calls using Future mechanism.
I use get() to lock and wait for a response, and would like to get notified,
if some specified timeout happens. Right now, 60 seconds seems to be
default, and i get some stack trace printed into log file:
2009-03-31 12:36:59,161 WARN [org.apache.cxf.transport.http.HTTPConduit] -
<Read timed out>
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
Unfortunately get() method does not return nor throws any exception which
results in a deadlock.
I then tried invoking get(10L,TimeUnit.SECONDS). I also had to try catch
TimeoutException.
In this case method did throw an exception after 10 seconds, strange as it
seems, it was not TimeoutException, rather:
java.lang.NullPointerException
at
org.apache.cxf.jaxws.JaxWsClientProxy$ResponseCallback.get(JaxWsClientProxy.java:348)
Am i missing something here? The only way i see now, is actually catching
this NPE, and treating as it was Timeout.
--
View this message in context:
http://www.nabble.com/CXF-2.2-Async-calls-result-in-deadlock-or-NPE-tp23555549p23555549.html
Sent from the cxf-user mailing list archive at Nabble.com.