Reverse dns resolution in CXF AsyncHTTPConduit for the proxy host address
Issue
- When using the CXF Soap client
(org.apache.cxf.jaxws.JaxWsProxyFactoryBean)
provided with jboss Fuse and configured to use:- asynchronous http (AsyncHTTPConduit.USE_ASYNC set to TRUE),
- an http proxy (IP and port is given)
from time to time we observe that the client thread is blocked during 5 seconds when initiating a SOAP call.
After some investigation, we have found out that this 5 seconds are lost in a DNS reverse-resolution of the given IP address of the http proxy. (The DNS resolution times out after 5 seconds)
This name reverse-resolution is made in org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit#setupConnection
:
Proxy p = this.proxyFactory.createProxy(csPolicy, uri);
if(p != null && p.type() != Type.DIRECT) {
InetSocketAddress isa = (InetSocketAddress)p.address();
HttpHost proxy = new HttpHost(isa.getHostName(), isa.getPort());
b.setProxy(proxy);
}
The InetSocketAddress#getHostName
call is where the reverse-resolution occurs as described in its javadoc.
- What we expect:
AsyncHTTPConduit should not do any DNS resolution on the http proxy IP
.
Environment
- Red Hat JBoss Fuse
- 6.3.x
- Apache CXF
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.