You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Apache Wiki <wi...@apache.org> on 2006/01/04 15:50:30 UTC

[Ws Wiki] Update of "FrontPage/Axis/AxisCommonsHTTP" by CyrilleLeClerc

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:
Document CommonsHTTPSender configuration parameters

------------------------------------------------------------------------------
  {{{
  <?xml version="1.0" encoding="UTF-8"?> 
  
- <deployment name="commonsHTTPConfig" xmlns="<noWiki>http://xml.apache.org/axis/wsdd/</noWiki>" xmlns:java="<noWiki>http://xml.apache.org/axis/wsdd/providers/java</noWiki>"> 
+ <deployment 
+     name="commonsHTTPConfig" 
+     xmlns="http://xml.apache.org/axis/wsdd/" 
+     xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+ 
+   <!-- use CommonsHTTPSender instead of the default HTTPSender -->
-  <transport name="http" pivot="<noWiki>java:org.apache.axis.transport.http.CommonsHTTPSender</noWiki>" />  
+   <transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" />  
+ 
-   <transport name="local" pivot = "<noWiki>java:org.apache.axis.transport.local.LocalSender</noWiki>" /> 
+   <transport name="local" pivot = "java:org.apache.axis.transport.local.LocalSender" /> 
-   <transport name="java" pivot="<noWiki>java:org.apache.axis.transport.java.JavaSender</noWiki>" /> 
+   <transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender" /> 
  </deployment>
  }}}
  
- Finally, you will almost certainly want to adjust the default settings for the connection pool (pool size, timeout, and so forth). Those are defined in the {{{org.apache.axis.components.net.CommonsHTTPClientProperties}}} interface and can be set using the {{{AxisProperties API}}} that is used by all of the pluggable components in Axis. You can also provide your own implementation of the interface if you need to do some special adjustments to those settings. For that you would use the commons-discovery API. (Note this requires Axis 1.2) 
+ Finally, you will almost certainly want to adjust the default settings for the connection pool (pool size, timeout, and so forth). Those are defined in the {{{org.apache.axis.components.net.CommonsHTTPClientProperties}}} interface and can be set using the {{{AxisProperties API}}} that is used by all of the pluggable components in Axis. 
+ You can also provide your own implementation of the interface if you need to do some special adjustments to those settings. For that you would use the commons-discovery API. (Note this requires Axis 1.2).
  
+ Sample of configuration with {{{AxisProperties}}} :
+ {{{
+ // "Total Connections" Pool size
+ AxisProperties.setProperty(
+     DefaultCommonsHTTPClientProperties.MAXIMUM_TOTAL_CONNECTIONS_PROPERTY_KEY, 
+     maxTotalConnections);
+ 
+ // "Connections per host" pool size
+ AxisProperties.setProperty(
+     DefaultCommonsHTTPClientProperties.MAXIMUM_CONNECTIONS_PER_HOST_PROPERTY_KEY, 
+     maxConnectionsPerHost);
+ 
+ // max duration to wait for a connection from the pool
+ AxisProperties.setProperty(
+     DefaultCommonsHTTPClientProperties.CONNECTION_POOL_TIMEOUT_KEY, connectionPoolTimeout);
+ 
+ // Timeout to establish connection in millis
+ AxisProperties.setProperty(
+     DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY, connectionTimeout);
+ 
+ // Timeout "waiting for data" (read timeout)
+ AxisProperties.setProperty(
+     DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_SO_TIMEOUT_KEY, soTimeout);
+ 
+ // you can then call your web service as usual
+ 
+ }}}
+ 
+ '''Further readings'''
+ 
+ {{{CommonsHTTPSender}}} relies on the {{{MultiThreadedHttpConnectionManager}}} of Jakarta Commons Http Client.
+ {{{MultiThreadedHttpConnectionManager}}} is documented [http://jakarta.apache.org/commons/httpclient/threading.html here]
+