Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change 
notification.

The following page has been changed by CyrilleLeClerc:
http://wiki.apache.org/ws/FrontPage/Axis/AxisCommonsHTTP

The comment on the change is:
 Add "Q: How do I enable Http Keep Alive with CommonsHTTPSender ?"

------------------------------------------------------------------------------
  ##language:en
  '''Q: How do I configure the Axis client to pool connections with {{{Apache 
Jakarta Commons-HttpClient?}}}'''
  
- A: You'll need to install [http://jakarta.apache.org/commons/httpclient/ 
Jakarta Commons Http Client] jar in your CLASSPATH or WEB-INF/lib, if your 
client is deployed as a web application. 
+ A: You'll need to add the [http://jakarta.apache.org/commons/httpclient/ 
Jakarta Commons Http Client] jar in your CLASSPATH or WEB-INF/lib (for web 
applications). 
  
- Note that if you are building Axis from source, you will also need to put 
commons-httpclient jar in Axis dependencies directory so that the 
{{{CommonsHTTPSender}}} class is built. 
+ (!) Note that if you are building Axis from source, you will also need to put 
commons-httpclient jar in Axis dependencies directory so that the 
{{{CommonsHTTPSender}}} class is built. 
  
  Next, you'll need to install a client-config.wsdd (sample 
[attachment:client-config.wsdd here]) that tells Axis to use 
{{{CommonsHTTPSender}}} instead of the standard HTTPSender when 
sending/receiving messages via HTTP. Here's an example: 
  
@@ -74, +74 @@

  
  In Axis 1.3, the {{{MultiThreadedHttpConnectionManager}}} is an internal of 
the Service``Locator and thus, it is not possible to share the same 
{{{MultiThreadedHttpConnectionManager}}} between several Service``Locators 
(i.e. between several web services).
  
+ ''' Q: How do I enable Http Keep Alive with CommonsHTTPSender ?'''
+ 
+ Http keep-alive is enabled by default with CommonsHTTPSender : there is no 
special configuration nor coding instruction to add.
+ 
+ This is due to the fact that, by default, CommonsHTTPSender uses HTTP 1.1 and 
HTTP 1.1 specification states that, by default, http connections are persistent 
(i.e. use keep-alive).
+ 
+ Extract from 
[http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.1.2.1 RFC 2616 : 
HTTP/1.1 - Persistent Connection] :
+  ''An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to maintain a 
persistent connection unless a Connection header including the connection-token 
"close" was sent in the request''
+ 
  '''Further readings'''
  
  {{{CommonsHTTPSender}}} relies on the 
{{{MultiThreadedHttpConnectionManager}}} of Jakarta Commons Http Client.

Reply via email to