-
1. Re: Is there a way to set a JaxWS connection timeout which works for CXF and Native
asoldano Sep 1, 2010 7:35 AM (in response to adinn)Is there also a way of configuring the timeout in JBossWS-CXF?
You need to use what CXF provides; you can do this by properly setting the bus in advance (see https://cwiki.apache.org/confluence/display/CXF20DOC/Client+HTTP+Transport+%28including+SSL+support%29 , basically you need to tune the client http conduit) or directly configuring you client using the cxf api:
Client client = ClientProxy.getClient(proxy); ((ClientImpl)client).setSynchronousTimeout(90 * 1000); //90 secs
Is there a way of doing this so it runs on either stack
Not ATM, I've just created https://jira.jboss.org/browse/JBWS-3114 , scheduled for the 3.4.0 (the first version coming out)
It would be useful if this configuration option were defined in the JaxWS standard. Is there any chance of this?
We can think about a proposal, just having a standard prop for that would probably be a good start...
-
2. Re: Is there a way to set a JaxWS connection timeout which works for CXF and Native
adinn Sep 1, 2010 10:43 AM (in response to asoldano)Alessio Soldano wrote:
You need to use what CXF provides; you can do this by properly setting the bus in advance (see https://cwiki.apache.org/confluence/display/CXF20DOC/Client+HTTP+Transport+%28including+SSL+support%29 , basically you need to tune the client http conduit) or directly configuring you client using the cxf api:
Ok, thanks Alessio. I will leave that to my users to do just for now as the use fo an RPC termination protocol is primarily for use with a standalone XTS client running outside the AS. But thanks for the tip.
I've just created https://jira.jboss.org/browse/JBWS-3114 , scheduled for the 3.4.0 (the first version coming out)
Excellent. I'll probably be the first to use it when it arrives.
It would be useful if this configuration option were defined in the JaxWS standard. Is there any chance of this?
We can think about a proposal, just having a standard prop for that would probably be a good start...
Ok, that's great. I'd rather have everything we rely on be standardised. We can treat JBWS-3114 as an excuse to investigate a standard model for achieving this. I'll attach any ideas I have to that JIRA.
-
3. Re: Is there a way to set a JaxWS connection timeout which works for CXF and Native
jim.ma Sep 17, 2010 4:49 AM (in response to adinn)1 of 1 people found this helpfulHi Andrew,
I've added this two properties "javax.xml.ws.client.connectionTimeout", "javax.xml.ws.client.receiveTimeout" to cxf and native stack for the stack agnostic timeout configuration:
public void testConfigureTimeout() throws Exception
{
//Set timeout until a connection is established
((BindingProvider) port).getRequestContext().
put("javax.xml.ws.client.connectionTimeout", "6000");
//Set timeout until the response is received
((BindingProvider) port).getRequestContext().
put("javax.xml.ws.client.receiveTimeout", "1000");
String response = port.echo("testTimeout");
System.out.prinltn("Received response : response");
}This should be included in the 3.4.0 release. Let us know if you have any other problems.
-
4. Re: Is there a way to set a JaxWS connection timeout which works for CXF and Native
adinn Sep 17, 2010 7:36 AM (in response to adinn)Hi Jim,
Thanks for the fix. I'll upgrade my code in advance so that it starts to work as soon as your fix goes in.
I still have two questions regarding the behaviour:
- What are the units for the timeout (looks like milliseconds?)
- Is there a value which specifies no timeout (e.g. 0)
regards,
Andrew Dinn
-
5. Re: Is there a way to set a JaxWS connection timeout which works for CXF and Native
jim.ma Sep 20, 2010 7:23 AM (in response to adinn)1. What are the units for the timeout (looks like milliseconds?)
Yes. The units are milliseconds.
2. Is there a value which specifies no timeout (e.g. 0)
Set the timeout to "0" will the infinite/no timeout.
-
6. Re: Is there a way to set a JaxWS connection timeout which works for CXF and Native
asoldano Sep 30, 2010 12:51 PM (in response to asoldano)Additional related issue https://issues.apache.org/jira/browse/CXF-3011
-
7. Re: Is there a way to set a JaxWS connection timeout which works for CXF and Native
gerardce Aug 12, 2013 8:40 AM (in response to jim.ma)Hi Jim,
The two properties "javax.xml.ws.client.connectionTimeout" and "javax.xml.ws.client.receiveTimeout" are not JAXWS standard properties (regarding to spec 2.2 §4.2.1.1). There are CXF legacy properties.
So why did you named them "javax.xxx" ? Spec2.2 § 4.2.1.2 says :
"Implementations MAY define additional implementation
specific properties not listed in table 4.1. The java.* and javax.* namespaces are reserved for use by Java
specifications."
Regards,
Cédric
-
8. Re: Is there a way to set a JaxWS connection timeout which works for CXF and Native
asoldano Sep 9, 2013 9:19 AM (in response to gerardce)Good catch, thanks. Created https://issues.apache.org/jira/browse/CXF-5261