You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Pablo Caballero <pd...@gmail.com> on 2015/05/28 16:04:44 UTC

Sometimes time out does not work

Hi cxf folks!

We have some applications using cxf (2.2.10) as client to consume
(different) web services.
Once in a while we have a method invocation that take more time than time
out specified.
Here is the code chunk used to specify the time outs:

JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean();
...
Object instance = jaxWsProxyFactoryBean.create();
Client client = ClientProxy.getClient(instance);
client.setThreadLocalRequestContext(true);
HTTPConduit http = (HTTPConduit) client.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setAllowChunking(false);
httpClientPolicy.setConnectionTimeout(connectionTimeout);
httpClientPolicy.setReceiveTimeout(receiveTimeout);

I want to clarify that most of the time the time out works like expected

Have some of you experienced similar behavior?

Thank you very much

Regards

Re: Sometimes time out does not work

Posted by Aki Yoshida <el...@gmail.com>.
What do you want to clarify exactly and what is not working?

2015-05-28 16:04 GMT+02:00 Pablo Caballero <pd...@gmail.com>:
> Hi cxf folks!
>
> We have some applications using cxf (2.2.10) as client to consume
> (different) web services.
> Once in a while we have a method invocation that take more time than time
> out specified.
> Here is the code chunk used to specify the time outs:
>
> JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean();
> ...
> Object instance = jaxWsProxyFactoryBean.create();
> Client client = ClientProxy.getClient(instance);
> client.setThreadLocalRequestContext(true);
> HTTPConduit http = (HTTPConduit) client.getConduit();
> HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
> httpClientPolicy.setAllowChunking(false);
> httpClientPolicy.setConnectionTimeout(connectionTimeout);
> httpClientPolicy.setReceiveTimeout(receiveTimeout);
>
> I want to clarify that most of the time the time out works like expected
>
> Have some of you experienced similar behavior?
>
> Thank you very much
>
> Regards

Re: Sometimes time out does not work

Posted by carlos21369 <ca...@gmail.com>.
do you solved it?

I have the same problem the same code in the ReceiveTimeout = 3000 and 
the connectionTimeout = 3000, but delay as 15 seconds.

what can happen?