Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 21277 invoked from network); 29 Jun 2010 05:28:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jun 2010 05:28:49 -0000 Received: (qmail 4645 invoked by uid 500); 29 Jun 2010 05:28:48 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 3807 invoked by uid 500); 29 Jun 2010 05:28:45 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 3799 invoked by uid 99); 29 Jun 2010 05:28:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 05:28:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 05:28:41 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5T5KnUr026570 for ; Tue, 29 Jun 2010 05:20:50 GMT Message-ID: <12917475.106941277788849963.JavaMail.jira@thor> Date: Tue, 29 Jun 2010 01:20:49 -0400 (EDT) From: "Jarek Gawor (JIRA)" To: java-dev@axis.apache.org Subject: [jira] Commented: (AXIS2-4751) Cookie value is always kept whatever SESSION_MAINTAIN_PROPERTY value is configured In-Reply-To: <24906321.53871277449189471.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-4751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883412#action_12883412 ] Jarek Gawor commented on AXIS2-4751: ------------------------------------ Glen, I read those pages before and I think they are misleading. If all requests use the same configuration then yes reusing HttpClient instance makes sense. But if each request can have different settings (e.g. HTTP 1.0 vs. HTTP 1.1, different socket timeouts, cookies, etc.) then reusing HttpClient does not work. And that's what is done in the AbstractHTTPSender. Anytime there is a call to httpClient.getParams() to set some option that is a potential problem from thread safety point of view since we can't know what actual parameters will be used for a given call. To deal with HttpState, yes we can pass a new instance of it on each httpClient.executeMethod() but that still won't address the HttpParams issue. There is nothing special about HttpClient. It doesn't do any special multi-threaded connection management. It's just a simple wrapper that makes making multiple http calls using the same configuration a bit easier. Just take a look at the source code: http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/tags/HTTPCLIENT_3_1/src/java/org/apache/commons/httpclient/HttpClient.java?view=markup >From my POV creating new HttpClient instances is a little bit easier since we don't have to worry about thread-safety at all. But if we want to reuse HttpClient instances we have to make sure (by rewriting some code) that setting one parameter on one thread does not affect a request on another thread. > 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: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org