[ 
https://issues.apache.org/jira/browse/AXIS2-4751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887782#action_12887782
 ] 

Jarek Gawor commented on AXIS2-4751:
------------------------------------

I recommitted my changes to trunk (revision 963710) to 1.5 branch (revision 
963711) with a small change that actually disables automatic connection reuse. 
It seems there are other bugs in Axis2 or related libraries or tests that cause 
the test failures when the connection manager is properly reused.

But let me start over. First of all, before my changes the getHttpClient() code 
in trunk and 1.5 branch were different. The code in 1.5 branch was 'newer' than 
in trunk and was attempting to automatically reuse the 
HttpClient/HttpConnectionManager. The code in trunk would not automatically 
reuse the HttpClient/HttpConnectionManager. I guess the code from 1.5 didn't 
get merged to trunk at some point. 
If the code from 1.5 branch was merged to trunk we would see the same type of 
failures in Rampart, etc. as with my changes. So there are some other bugs in 
Axis2 or related libraries or badly written tests that cause these problems 
when connection reuse is enabled.

On top of that the code in 1.5 branch was attempting to reuse the HttpClient 
instance. And as mentioned before the way the HttpClient is used in the 
AbstractHTTPSender.java is not thread safe. So a single HttpClient instance 
cannot be reused unless we update some code & apis.

As to the test failures, the tests fail because the connection pool runs out of 
available connections. That most likely indicates that some connections are not 
released correctly. The connections should be released automatically if the 
input stream is completely consumed or TransportSender.cleanup() is called. I 
think some tests are either not fully consuming the input or releasing the 
connections. For example, the RampartTest passes for me if I add 
options.setCallTransportCleanup(true); to RampartUtil.java:751.


> Cookie value is always kept whatever SESSION_MAINTAIN_PROPERTY value is 
> configured
> ----------------------------------------------------------------------------------
>
>                 Key: AXIS2-4751
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4751
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>            Reporter: Ivan
>            Assignee: Jarek Gawor
>         Attachments: Axis2-475.patch
>
>
> Cookie value is always kept whatever SESSION_MAINTAIN_PROPERTY value is 
> configured

-- 
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]

Reply via email to