[
https://issues.apache.org/jira/browse/TUSCANY-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ant elder updated TUSCANY-1997:
-------------------------------
Attachment: tuscany-binding-ws-axis2-1.0-incubating-TUSCANY-1997.jar
Here's a jar containing the fix rebased to the 1.0 code level. This has built
ok for me but i'm getting some security test failures running with it, i
suspect these are an environment problem with the way i'm adding it in to the
backlevel code without using a full 1.0 local build but you'll need to test it
in your environment to be sure. The 1.0 code doesn't have some changes in the
1.1 code so i've had to include more code changes, the complete diff for the
patched jar is:
Index:
src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java
===================================================================
---
src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java
(revision 630862)
+++
src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java
(working copy)
@@ -48,7 +48,11 @@
// ensure connections are tracked so that they can be closed by the
reference binding
MessageContext requestMC =
operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
- requestMC.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);
+ //requestMC.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);
+ Options opt = requestMC.getOptions();
+ opt.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
+ opt.setUseSeparateListener(true);
+ opt.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,Boolean.TRUE);
operationClient.execute(false);
Index:
src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
===================================================================
---
src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
(revision 630862)
+++
src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
(working copy)
@@ -52,8 +52,10 @@
import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
import org.apache.axis2.description.WSDL2Constants;
import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.axis2.util.threadpool.ThreadPool;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
+import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
import org.apache.tuscany.sca.assembly.AbstractContract;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.contribution.Contribution;
@@ -108,7 +110,26 @@
AxisService axisService =
createClientSideAxisService(wsdlDefinition, serviceQName,
portName, new Options());
+ HttpClient httpClient = (HttpClient)
configContext.getProperty(HTTPConstants.CACHED_HTTP_CLIENT);
+ if (httpClient == null)
+ {
+ MultiThreadedHttpConnectionManager connectionManager = new
MultiThreadedHttpConnectionManager();
+ HttpConnectionManagerParams connectionManagerParams = new
HttpConnectionManagerParams();
+ connectionManagerParams.setDefaultMaxConnectionsPerHost(2);
+ connectionManagerParams.setTcpNoDelay(true);
+ connectionManagerParams.setStaleCheckingEnabled(true);
+ connectionManagerParams.setLinger(0);
+ connectionManager.setParams(connectionManagerParams);
+ httpClient = new HttpClient(connectionManager);
+ configContext.setThreadPool(new ThreadPool(1, 5));
+ configContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
+ Boolean.TRUE);
+ configContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
+ httpClient);
+ }
+
return new ServiceClient(configContext, axisService);
+
} catch (AxisFault e) {
throw new RuntimeException(e); // TODO: better exception
}
> Axis binding does not allow external configuration to increase the number of
> the maximum connections opened.
> ------------------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-1997
> URL: https://issues.apache.org/jira/browse/TUSCANY-1997
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Axis Binding Extension
> Environment: Solaris , Windows , Websphere , Tomcat
> Reporter: Catalin Boloaja
> Assignee: Jean-Sebastien Delfino
> Fix For: Java-SCA-1.2
>
> Attachments:
> tuscany-binding-ws-axis2-1.0-incubating-TUSCANY-1997.jar,
> tuscany-binding-ws-axis2-1.1-TUSCANY-1997.jar
>
>
> In a high volume situation the default setting for Axis2 is 2 connections per
> host.
> The default protocol being HTTP 1.1 , this means that only 2 POST requests
> can be issued at the same time.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]