[JBossWS] - Re: Using StubExt.PROPERTY_CLIENT_TIMEOUT to control timeout
by jamesjoh
After a lot of time in the debugger I have figured out my issue. I don't think there is a great way to 'solve' it. Basically it looks like there are 3 seperate attempts to 'connect' to the endpoint, each one which honors the timeout. I set my timeout to 45 seconds and it will consistently return from my dispatch.invoke call 2 minutes & 15 seconds later (45 * 3).
First attempt: org.jboss.remoting.transport.http.HttpClientInvoker.useHttpURLConnection. The call to conn.getOutputStream takes 45 seconds to timeout if the endpoint its trying to connect to is unavailable. This throws an exception that is caught. In the exception handling block there is a call to HttpUrlConnection.getResponseMessage(), which chains to HttpUrlConnection.getResponseCode(). In HttpUrlConnection.getResponseCode() there is a call to HttpUrlConnection.getInputStream() which takes 45 seconds to timeout. After that times out it attempts to call HttpUrlConnection.getHeaderField(0) which also takes 45 seconds to time out. Finally control returns up the stack to my dispatch call where I can deal with the timeout.
Seems pretty crappy but there doesn't appear to be anything I can do about it. The actual code for HttpUrlConnection leads into closed source SUN code so I've hit a wall for figuring out if there's anything I can do. Anyway hope this info helps someone, maybe someone will read this and have an idea on how to get a true 45 second timeout.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227915#4227915
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227915
15 years, 5 months
[JBossWS] - Using StubExt.PROPERTY_CLIENT_TIMEOUT to control timeout of
by jamesjoh
I'm using the native jbossws jax-ws 2.0 implementation. I want to control the timeout on a request I am making to a customer's web service. After searching I found out about setting the property
StubExt.PROPERTY_CLIENT_TIMEOUT
on the request context, which I get from my Dispatch object. I set the timeout to 120 seconds (120000 milliseconds). Though my request timed out much quicker than the default timeout, it actually took about 5 minutes for it to time out. The exception thrown said it timed out after "120000ms" but the log entries for the request start & timeout exception are 5 minutes apart. I dropped it down to 90 seconds and it took roughly 4 minutes to time out. Is there something magic about this property that the desired timeout is not being honored? Clearly the property is being used in SOME capacity to control the timeout, it just isn't actually timing out at the desired time. Does anyone have any insight into why this is? Thank you in advance for your time.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227867#4227867
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227867
15 years, 5 months
[JBossWS] - Re: WSConsume does not support JAX-WS 2.1 with JBossWS 3.0.5
by joshua.dev
Thank you for the answers. I've decided to step back and use JAX-WS 2.0, hopefully integration with external parties won't be a problem.
"alessio.soldano(a)jboss.com" wrote : I'd need to double check what was available in AS 4.2.2, I think the -t 2.1 option was later disabled because the implementation of JAX-WS 2.1 was not complete yet.
I am sure I used the "-t 2.1" switch on default install of AS 4.2.2.GA.
"alessio.soldano(a)jboss.com" wrote : For sure you can use the 2.1 target starting from JBossWS Native 3.1.0.GA as the JAX-WS 2.1 has been completed there.
| Otherwise (if you cant move to AS 4.2.3 which is the oldest target container supported by JBossWS 3.1.0) try with JBossWS-Metro 3.0.5, which already had full JAX-WS 2.1 impl.
I'll probably have to stay with 4.2.2 now, but I'll take the information about working WS 3.1.0 and JAX-WS 2.1 into accound when I'll be considering AS upgrade.
The Metro stack was giving me some problems after deployment, I briefly went through the exceptions' stacks but had no time to figure out what exactly went wrong.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227464#4227464
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227464
15 years, 5 months