You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Chester Kim (JIRA)" <ji...@apache.org> on 2016/07/06 16:46:11 UTC
[jira] [Updated] (CXF-6964) JAX-RS 2 client api - needs support
httpclient parameters in configuration
[ https://issues.apache.org/jira/browse/CXF-6964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chester Kim updated CXF-6964:
-----------------------------
Description:
To configure a jax-rs client low level parameters of httpclient, I'm currently doing like following ways
{code}
ClientBuilder clientBuilder = ClientBuilder.newBuilder()
.property(CoreConnectionPNames.CONNECTION_TIMEOUT, connectionTimeout)
.property(CoreConnectionPNames.SO_TIMEOUT, socketTimeout)
.property(ClientPNames.CONN_MANAGER_TIMEOUT, requestTimeout)
.property("http.connection-manager.max-per-host", ImmutableMap.of(HostConfiguration.ANY_HOST_CONFIGURATION, maxConnHost))
.property("http.connection-manager.max-total", maxConnTotal)
.property(CoreConnectionPNames.STALE_CONNECTION_CHECK, true)
.register(JACKSON_PROVIDER);
{code}
and I noticed all these ways of configurations are deprecated way in httpcomponent 4.x.
They recommended to use org.apache.http.client.config and org.apache.http.config (like RequestConfig) but I couldn't find any possible (or straightforward) direction in CXF.
There must be new way of support this configuration over deprecated way.
was:
To configure a jax-rs client low level parameters of httpclient, I'm currently doing like following ways
{code}
ClientBuilder clientBuilder = ClientBuilder.newBuilder()
.property(CoreConnectionPNames.CONNECTION_TIMEOUT, connectionTimeout)
.property(CoreConnectionPNames.SO_TIMEOUT, socketTimeout)
.property(ClientPNames.CONN_MANAGER_TIMEOUT, requestTimeout)
.property("http.connection-manager.max-per-host", ImmutableMap.of(HostConfiguration.ANY_HOST_CONFIGURATION, maxConnHost))
.property("http.connection-manager.max-total", maxConnTotal)
.property(CoreConnectionPNames.STALE_CONNECTION_CHECK, true)
.register(JACKSON_PROVIDER);
{code}
and I noticed all these ways of configurations are deprecated way in httpcomponent 4.x.
They recommended to use org.apache.http.client.config and org.apache.http.config but I couldn't find any possible (or straightforward) direction in CXF.
There must be new way of support this configuration over deprecated way.
> JAX-RS 2 client api - needs support httpclient parameters in configuration
> --------------------------------------------------------------------------
>
> Key: CXF-6964
> URL: https://issues.apache.org/jira/browse/CXF-6964
> Project: CXF
> Issue Type: Improvement
> Components: Configuration
> Affects Versions: 3.1.6
> Environment: Linux / Mac OS/X 10.10.5
> Reporter: Chester Kim
> Labels: configuration, httpclient, httpcomponent, timeout
>
> To configure a jax-rs client low level parameters of httpclient, I'm currently doing like following ways
> {code}
> ClientBuilder clientBuilder = ClientBuilder.newBuilder()
> .property(CoreConnectionPNames.CONNECTION_TIMEOUT, connectionTimeout)
> .property(CoreConnectionPNames.SO_TIMEOUT, socketTimeout)
> .property(ClientPNames.CONN_MANAGER_TIMEOUT, requestTimeout)
> .property("http.connection-manager.max-per-host", ImmutableMap.of(HostConfiguration.ANY_HOST_CONFIGURATION, maxConnHost))
> .property("http.connection-manager.max-total", maxConnTotal)
> .property(CoreConnectionPNames.STALE_CONNECTION_CHECK, true)
> .register(JACKSON_PROVIDER);
> {code}
> and I noticed all these ways of configurations are deprecated way in httpcomponent 4.x.
> They recommended to use org.apache.http.client.config and org.apache.http.config (like RequestConfig) but I couldn't find any possible (or straightforward) direction in CXF.
> There must be new way of support this configuration over deprecated way.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)