Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 86750 invoked from network); 2 Jan 2007 03:37:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2007 03:37:00 -0000 Received: (qmail 38325 invoked by uid 500); 2 Jan 2007 03:36:53 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 38252 invoked by uid 500); 2 Jan 2007 03:36:53 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 38223 invoked by uid 99); 2 Jan 2007 03:36:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jan 2007 19:36:53 -0800 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=DATE_IN_PAST_06_12 X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [209.68.5.15] (HELO relay01.pair.com) (209.68.5.15) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 01 Jan 2007 19:36:42 -0800 Received: (qmail 79872 invoked from network); 2 Jan 2007 03:35:53 -0000 Received: from unknown (HELO ?127.0.0.1?) (unknown) by unknown with SMTP; 2 Jan 2007 03:35:53 -0000 X-pair-Authenticated: 222.165.169.160 Message-ID: <45993D6B.60605@opensource.lk> Date: Mon, 01 Jan 2007 22:27:15 +0530 From: Deepal Jayasinghe User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-dev@ws.apache.org Subject: Re: Concurrency in RPC Service with transportscope References: <1302736922.20061223153245@yahoo.ca> In-Reply-To: <1302736922.20061223153245@yahoo.ca> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Ivan ; pls see my comment below; >Hello All, > > I submitted improvement request into JIRA (http://issues.apache.org/jira/browse/AXIS2-1911) > And after I done some testing one more question arise. > > I have a simple RPC service with transportscope running on http port. > So according to the doc's Axis will bound my service to the transport session, in my case it is HttpSession, > and will use the same service for all requests within a session. > > Yes , the same service impl will be used to serve all the request coming through that particular transport session. > So the question how is Axis handle concurrency when service implementation need to have an access to the session ? > > Axis2 handle that using Thread Local , where we store the message context in side the the TL and service impl need to get the session using MessageContext. Other than that Axis2 dose not handle any concurrency. > Because my proposed solution for AXIS-1911 is not thread safe without obtaining a monitor on service implementation. > > Is there are a way to notify implementation when it is bound to the session and unbound ? > > Yes , when the session start it will call; init(ServiceContext sc){ } and when the session finishes; destroy(ServiceContext sc){ } You can add those two methods into your service impl class , then those will be called using java reflection. Thanks Deepal > It will be most desirable behavior and thread safe. > > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org