You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Aki Yoshida <el...@gmail.com> on 2015/06/09 12:30:06 UTC

Re: Sometimes time out does not work

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