Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated settings descriptions

...

By default, if the cxf-rt-transports-http-hc module is found on the classpath, CXF will use the HttpAsyncClient based implementation for any Async calls, but will continue to use the HttpURLConnection based transport for synchronous calls. This allows a good balance of performance for the common synchronous cases with scalability for the asynchronous cases. However, using a contextual property of "use.async.http.conduit" and set to true/false, you can control whether the async or blocking version is used. If "true", the HttpAsyncClient will be used even for synchronous calls, if "false", asynchronous calls will rely on the traditional method of using HTTPURLConnection along with a work queue to mimic the asynchronocity.

Setting Credentials

The "normal" CXF/JAX-WS method of setting user credentials via the BindingProvider.USERNAME_PROPERTY/PASSWORD_PROPERTY will work with the Async transport as well. However, the HttpAsyncClient library does have some additional capabilities around NTLM that can be leveraged. In order to use that, you need to:

...

Settings related to the underlying TCP socket (see java.net.Socket for a definition of these values):

org.apache.cxf.transport.http.async.TCP_NODELAY The TCP_NODELAY for the socket. Defaults to true.(Default true)

org.apache.cxf.transport.http.async.SO_KEEPALIVE

 

org.apache.cxf.transport.http.async.SO_LINGER 

org.apache.cxf.transport.http.async.SO_TIMEOUT

 

Settings related to Keep-Alive connection management:

...

org.apache.cxf.transport.http.async.usePolicy

ALWAYS, ASYNC_ONLY, NEVER.

Similar in meaning to the "use.async.http.conduit" context property described above. Whether to use the HttpAsyncClient: ALWAYS for both synchronous and asynchronous calls, ASYNC_ONLY (default) for asynchronous calls only, NEVER will use HTTPURLConnection for both types of calls.