[
https://issues.apache.org/jira/browse/CXF-7818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608791#comment-16608791
]
Freeman Fang commented on CXF-7818:
-----------------------------------
I think such http connection pooling isn't controlled by CXF, it is controlled
by HttpURLConnection from JDK.
The ConnectionTimeout and ReceiveTimeout have nothing to do with http
connection pooling
they are
{code}
ConnectionTimeout
Specifies the amount of time, in milliseconds, that the client will attempt to
establish a connection before it times out. The default is 30000 (30 seconds).
0 specifies that the client will continue to attempt to open a connection
indefinitely.
ReceiveTimeout
Specifies the amount of time, in milliseconds, that the client will wait for a
response before it times out. The default is 60000.
0 specifies that the client will wait indefinitely.
{code}
> HTTPConduit - timeout ignore when using dispatch as client
> ----------------------------------------------------------
>
> Key: CXF-7818
> URL: https://issues.apache.org/jira/browse/CXF-7818
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 3.2.4
> Reporter: boonhock
> Priority: Major
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Hi All, I am using org.apache.cxf.transport.http.HTTPConduit as HTTP session
> and javax.xml.ws.Dispatch as client. I am trying to set connection timeout to
> 10 minutes so that it is still alive after it received the response
> (persistent connection). However, the second message do not use the same
> connection as the first one.
> After the first message end, if I execute it to send second SOAP message
> between 4 seconds, it is still using the same connection.
> Thus, I would like to ask am I missing something here?
>
> Code:
> Client client = ((DispatchImpl) dispatch).getClient();
> HTTPConduit conduit = (HTTPConduit) client.getConduit();
>
> TLSClientParameters tlsClientParameters = new TLSClientParameters();
> tlsClientParameters.setSSLSocketFactory(socketFactory);
> tlsClientParameters.setDisableCNCheck(true);
> conduit.setTlsClientParameters(tlsClientParameters);
>
> conduit.getClient().setConnection(ConnectionType.KEEP_ALIVE);
> conduit.getClient().setConnectionTimeout(600000);
> conduit.getClient().setAllowChunking(false);
> conduit.getClient().setReceiveTimeout(600000);
> SOAPMessage response = dispatch.invoke(requestSource);
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)