axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <g...@thoughtcraft.com>
Subject Re: svn commit: r992877 - in /axis/axis2/java/core/trunk: ./ modules/adb-codegen/test-resources/testsuite/ modules/adb-codegen/test/org/apache/axis2/schema/particlemaxoccurs/ modules/kernel/src/org/apache/axis2/jsr181/ modules/kernel/src/org/apache/a
Date Fri, 17 Sep 2010 14:11:07 GMT
Hi Amila, Jarek,

On 9/17/2010 7:55 AM, Amila Suriarachchi wrote:
> As I told, this bug is reported with Axis2 1.5.1 not with trunk. hence this
> issue is not relevant.

The issue isn't just 4751, Amila - the larger issues were 935, 2883, and
others (search for CLOSE_WAIT).  When we used the old (pre-1.5.1) methods of
connection management, there was a significant problem with memory leakage
and connection starvation, even if options.setCallTransportCleanup() had been
called.  The following code would die after about 3600 repetitions on
Windows, some other number on linux:

        ServiceClient client = new ServiceClient();
        Options options = new Options();
        // options.setCallTransportCleanup(true); // Doesn't matter
        options.setTo(new
EndpointReference("http://localhost:8080/axis2/services/Version"));
        options.setAction("urn:getVersion");
        client.setOptions(options);
        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
        String NS = "http://ws.apache.org/axis2";
        OMElement req = fac.createOMElement(new QName(NS, "getVersion"));
        for (int i = 0; i < 10000; i++) {
            client.sendReceive(req);
            System.out.println(i);
        }
        System.out.println("All done.");

The above will happily chug along forever with 1.5.1 and 1.5.2.

> this is the original code.
> [...]
> it reuses http client only if user has set so. otherwise if the user has set
> an http connection manager object then
> it creates a new httpClient per every call.
> 
> I'll revert this change since issue you point out is not applicable here.

Please don't do any further reverting.  I'd suggest as Jarek did that we
start another thread re: connection sharing.  I think the right answer is to
always use connection sharing and if you need more than 2 concurrent
connections to a given host you should just configure the
HttpConnectionManagerParams.

IMHO for 1.6 we need to:

 * Make sure sessions / cookies work as expected
 * Move to HTTPClient 4.0
 * Make sure we have a test suite that covers all the potential breakages,
   including the test above

Thanks,
--Glen

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message