Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 52407 invoked from network); 23 Mar 2007 09:12:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Mar 2007 09:12:28 -0000 Received: (qmail 3815 invoked by uid 500); 23 Mar 2007 09:12:33 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 3762 invoked by uid 500); 23 Mar 2007 09:12:32 -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 3751 invoked by uid 99); 23 Mar 2007 09:12:32 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of davidillsley@gmail.com designates 64.233.182.191 as permitted sender) Received: from [64.233.182.191] (HELO nf-out-0910.google.com) (64.233.182.191) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2007 02:12:31 -0700 Received: by nf-out-0910.google.com with SMTP id o63so1764472nfa for ; Fri, 23 Mar 2007 02:11:02 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QPWMYGkVAI9hdBwy3N8/s6RRd1ruZCj3iopXiwtZ+6T0Pol30xw9GqV2A3JELiqNLsCDqN+d4AlYs/T5KS8/Y5Ax5BB9NfNCwVmbFeewbygTZZMGGX55eqPVIGh2pBg/UB/Ol2D6AIYw8NoPKqSVK4677+Jsx3a+dX2qNN10q3Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NvCG0Rlq7xf4ghw5QL9qDpQ2DdCiMc3/zDqkIiVkcpy9nM1SPur0x18xdOEb+gB+zerwY7Dd2L1Gu1pDOmXr0FBppnnlMisaFqMVVfEm8IFdtgFYwwRZmnewnIcUOttDfYafYKM33t7KrJxj9sq63A/WE2aH7m4KUGbXEAl/Tao= Received: by 10.115.75.1 with SMTP id c1mr1086916wal.1174641060990; Fri, 23 Mar 2007 02:11:00 -0700 (PDT) Received: by 10.114.159.8 with HTTP; Fri, 23 Mar 2007 02:11:00 -0700 (PDT) Message-ID: <9abd5e730703230211m667e4a0h731c98f29a254fd1@mail.gmail.com> Date: Fri, 23 Mar 2007 09:11:00 +0000 From: "David Illsley" To: axis-dev@ws.apache.org Subject: Re: [Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext() In-Reply-To: <46037486.4070701@opensource.lk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9b85c45f0703222310s21727c8fx88f070dad2090bac@mail.gmail.com> <9b85c45f0703222319u65fa3563od1d2d0179f944249@mail.gmail.com> <9d4ec10b0703222324n496489e5ted5fad758564785@mail.gmail.com> <46037486.4070701@opensource.lk> X-Virus-Checked: Checked by ClamAV on apache.org Um... a couple of questions.. 1. How can we have multiple configuration contexts active in the same JVM if the factory hold the configuration context int a static field? 2. DO you intend to deprecate methods such as MessageContext.getConfigurationContext()? David On 23/03/07, Deepal Jayasinghe wrote: > I have no objection on doing this , > but inside ListenerManager we keep static reference to current > ConfigurationContext , cant we use that to achieve your goal ? > > In the other hand it is nice to have getConfigurationContext method in > ConfigurationContextFactory , then all the ConfigurationContext related > logic will be there in that class. > > Thanks > Deepal > > Chamikara Jayalath wrote: > > > [Added the prefix] > > > > ---------- Forwarded message ---------- > > From: *Afkham Azeez* > > > Date: Mar 23, 2007 11:49 AM > > Subject: Re: Introducing > > ConfigurationContextFactory.getConfigurationContext() > > To: Apache AXIS C Developers List > > > > > > Sorry. This was intended for the Axis2 Java Dev list. > > > > -- Azeez > > > > > > On 3/23/07, *Afkham Azeez* < afkham@gmail.com > > > wrote: > > > > I'm currently implementing the Configuration management portion of > > Axis2 clustering. This allows us to switch to a new configuration, > > without restarting Axis2. However, I discovered that there are > > pointers from many classes to the ConfigurationContext, hence > > switching to a new ConfigurationContext & AxisConfiguration is messy. > > > > Therefore I propose that we cache the ConfigurationContext > > instance in ConfigurationContextFactory. I am introducing the > > following to the ConfigurationContextFactory: > > > > --------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > > > /** > > * The cached instance of the ConfigurationContext > > * > > * Other objects should not hold referencs to the > > ConfigurationContext, and should ALWAYS > > * get ConfigurationContext from this factory. This is to > > ensure that the ConfigurationContext > > * can be seamlessly switched. > > */ > > private static ConfigurationContext configurationContext; > > > > /** > > * Return the cached ConfigurationContext instance > > * > > * @return The cached ConfigurationContext instance > > */ > > public static ConfigurationContext getConfigurationContext() { > > return configurationContext; > > } > > --------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > > > > > So, if someone calls a createConfigurationContext method on this > > factory, the old configurationContext instance will be replaced > > with the new one. Any object which wishes to get hold of the > > ConfigurationContext SHOULD call > > ConfigurationContextFactory.getConfigurationContext(), and should > > never hold a pointer to the ConfigurationContext. This will ensure > > that when the ConfigurationContext is changed, all objects in the > > system will use the correct ConfigurationContext object, and that > > the old object will get garbage collected. > > > > What do you think about this approach? > > > > -- > > Thanks > > Afkham Azeez > > > > http://www.wso2.org > > GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760 > > > > > > > > > > -- > > Thanks > > Afkham Azeez > > > > http://www.wso2.org > > GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760 > > > -- > Thanks, > Deepal > ................................................................ > "The highest tower is built one brick at a time" > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-dev-help@ws.apache.org > > -- David Illsley - IBM Web Services Development --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org