How do I setup my Axis2 generated stub to Reuse/share http connections?
Submitted on May 10, 2006 - 08:07. Story : Project :
Q: How do I setup my Axis2 generated stub to reuse/share http connections across several calls?
A: It's not too complicated..
TestServiceStub myStub = new TestServiceStub(wsURL);In fact if you need more control over the Commons HTTPClient's MultiThreadedHttpConnectionManager, you can even set it up yourself and then use the above snippet to make sure it gets used.
myStub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.
http.HTTPConstants.REUSE_HTTP_CLIENT, new Boolean(true));
ConfigurationContext context = ConfigurationContextFactory.For any further details or questions axis-dev@ws.apache.org (Prefix subject with with [Axis2])
createConfigurationContextFromFileSystem(null, null);
HttpClient httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
context.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient);
(1 vote)
»
- Login or register to post comments
- Printer friendly version
- 2316 reads
Tag Cloud
Apache Rampart
Apache Synapse
Axis2
Axis2
Axis2/C
Rampart/C
Axis2/C
WSF/C
data services
ESB
ESB
Identity Solution
Rampart/Java
Sandesha2/Java
Synapse/Java
Axis2/Java
ESB/Java
AXIOM/Java
WSAS/Java
Mashup Server
Mule
OpenID
open source
PHP
WSF/PHP
POJO
Proxy Services
rampart
Rampart
Registry
REST
Sandesha2
security
SOA
soap
Spring
Synapse
Synapse
Training
webinar
Web Services
WS-Security
WSAS
WSAS
wsdl
wsf
WSF/C
WSF/PHP
WSO2
WSO2 WSF/PHP











People this does not seem
People this does not seem to work.
I am trying this and maxing out with sockets in 'TIME_WAIT'.
Retraction
Well - if I had insured that BEFORE the very first HTTP request I had set the REUSE option it would have work.
It is important that the options are set before making a socket request.
Thanks.