Re: HTTP Persistent Connections: how to configure time after which client closes connection
This post has NOT been accepted by the mailing list yet.
I am writing a Web Service client using JAX-WS with Metro 2.3 RI.
My application is Multi Threaded and supposed to endure an heavy load there for I keep the Service (Thread Safe) as a static member and use an Object Pool for the Port objects.
The problem is that whenever I attempt to invoke the externalized web service method, a new connection is being created instead of reuse the active one.
Note that the connection stays established for 10 seconds.
I made sure to use the following VM arguments (-Djava.endorsed.dirs=endorsed -Dhttp.keepAlive=true -Dhttp.maxConnections=20) and verified that the keep alive header is being set as part of the HTTP Request.
I am putting in the endorsed folder all the Metro 2.3 jars (webservices-api.jar, webservices-extra.jar, webservices-extra-api.jar, webservices-rt.jar, webservices-tools.jar) and doing that in order to insure that I operate with the 2.3 version and not with what comes in the JDK. (I am using JDK1.7.0_51 and JRE1.7)
What else should I be doing in order to be able to work with HTTP connection pool (over Metro JAX-WS 2.3)?