> > On 3/23/07, *David Illsley* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > 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? > > > Why would we need multiple configuration contexts for a single Axis2 > instance?
When client is running inside the server. > > 2. DO you intend to deprecate methods such as > MessageContext.getConfigurationContext ()? > > > MessageContext.getConfigurationContext() will return the correct > ConfigurationContext. No plans to deprecate it at the moment. > > > David > > On 23/03/07, Deepal Jayasinghe <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> 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* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>> > > > Date: Mar 23, 2007 11:49 AM > > > Subject: Re: Introducing > > > ConfigurationContextFactory.getConfigurationContext() > > > To: Apache AXIS C Developers List <[email protected] > <mailto:[email protected]> > > > <mailto: [email protected] > <mailto:[email protected]>>> > > > > > > Sorry. This was intended for the Axis2 Java Dev list. > > > > > > -- Azeez > > > > > > > > > On 3/23/07, *Afkham Azeez* < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > 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 <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: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > > > > > -- > David Illsley - IBM Web Services Development > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > > > -- > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
