Re-use of MultiThreadedConnectionManager in CommonsHTTPSender
-------------------------------------------------------------
Key: AXIS2-300
URL: http://issues.apache.org/jira/browse/AXIS2-300
Project: Apache Axis 2.0 (Axis2)
Type: Improvement
Components: transports
Environment: HTTP 1.1
Reporter: Amanda Hopgood
Priority: Minor
When using CommonsHTTPSender then a new MultiThreadedConnectionManager is
created for each instance. This means that the MultiThreadedConnectionManager
is unique per Service object, and this is preventing our connections being
re-used. The MultiThreadedConnectionManager should be able to be shared between
different HTTPClient objects, and this request is to alter CommonsHTTPSender so
that a single instance of MultiThreadedConnectionManager is created and used by
many instances of CommonsHTTPSender.
In our application we have a Service object per calling thread, and so with the
current implementation there is one MultiThreadedConnectionManager per thread,
and so we are getting more connections then we really desire.
The reason we have a Service object per calling thread, was because we have
seen ConcurrentModificationExceptions if we perform load tests whilst sharing
Service objects over threads, i.e.
java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:726)
at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:759)
at
org.apache.axis.attachments.ManagedMemoryDataSource.delete(ManagedMemoryDataSource.java:454)
at
org.apache.axis.attachments.AttachmentsImpl.writeContentToStream(AttachmentsImpl.java:476)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira