You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Chamikara Jayalath <ch...@gmail.com> on 2007/03/23 07:24:17 UTC

[Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext()

[Added the prefix]

---------- Forwarded message ----------
From: Afkham Azeez <af...@gmail.com>
Date: Mar 23, 2007 11:49 AM
Subject: Re: Introducing ConfigurationContextFactory.getConfigurationContext
()
To: Apache AXIS C Developers List <ax...@ws.apache.org>

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

Re: [Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext()

Posted by Deepal Jayasinghe <de...@opensource.lk>.
>
> On 3/23/07, *David Illsley* <davidillsley@gmail.com
> <ma...@gmail.com>> 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 <deepal@opensource.lk
>     <ma...@opensource.lk>> 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* <afkham@gmail.com
>     <ma...@gmail.com> <mailto:afkham@gmail.com
>     <ma...@gmail.com>>>
>     > > Date: Mar 23, 2007 11:49 AM
>     > > Subject: Re: Introducing
>     > > ConfigurationContextFactory.getConfigurationContext()
>     > > To: Apache AXIS C Developers List <axis-c-dev@ws.apache.org
>     <ma...@ws.apache.org>
>     > > <mailto: axis-c-dev@ws.apache.org
>     <ma...@ws.apache.org>>>
>     > >
>     > > Sorry. This was intended for the Axis2 Java Dev list.
>     > >
>     > > -- Azeez
>     > >
>     > >
>     > > On 3/23/07, *Afkham Azeez* < afkham@gmail.com
>     <ma...@gmail.com>
>     > > <mailto:afkham@gmail.com <ma...@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 <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
>     <ma...@ws.apache.org>
>     > For additional commands, e-mail: axis-dev-help@ws.apache.org
>     <ma...@ws.apache.org>
>     >
>     >
>
>
>     --
>     David Illsley - IBM Web Services Development
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-dev-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
>
>
> -- 
> 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


Re: [Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext()

Posted by David Illsley <da...@gmail.com>.
> > > On 3/23/07, David Illsley <da...@gmail.com> 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?
> >
> > At the moment we can have more that 1 Axis2 instance running in a
> > single JVM. I'd like to keep that capability and this proposal (I
> > think) prevents that.
>
>  I don't think this will be a case in a production setup. Simply put, we
> need some method to ensure that all objects within an Axis2 runtime use the
> same configuration context.

I totally disagree. One of the things I really like about the Axis2
architecture is that there is such flexibility in how you deploy it.

> > And yet you don't want to deprecate a method which returns a held
> > reference to the ConfigurationContext?
>
>
> The correct ConfigurationContext is linked with the  MessageContext when
> the MessageContext is created. So there is no need to remove this method.

Right, so I think the javadoc sould have to be modified to explain the
lifecycles and when it's safe to cache the ConfigurationContext
instances.

> > What is the scenario that you're trying to support?
>
> The ability to reload the configurations of a group of Axis2 nodes in a
> cluster without having to restart them one by one.

This isn't something I see a need to support in this way. Why is it
not possible to load the new configuration into the existing objects?

David

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


Re: [Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext()

Posted by Davanum Srinivas <da...@gmail.com>.
Hmm, I don't agree that all instances should share the same
AxisConfiguration. Plus this is too late in the game for 1.2

I could live with a special constructor/switches for new behavior and
keeping the code behavior unchanged. But you need to think it through.

thanks,
dims


On 3/23/07, Afkham Azeez <af...@gmail.com> wrote:
>
>
> On 3/23/07, David Illsley <da...@gmail.com> wrote:
> > On 23/03/07, Afkham Azeez <af...@gmail.com> wrote:
> > >
> > >
> > > On 3/23/07, David Illsley <da...@gmail.com> 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?
> >
> > At the moment we can have more that 1 Axis2 instance running in a
> > single JVM. I'd like to keep that capability and this proposal (I
> > think) prevents that.
>
>  I don't think this will be a case in a production setup. Simply put, we
> need some method to ensure that all objects within an Axis2 runtime use the
> same configuration context.
>
> > And yet you don't want to deprecate a method which returns a held
> > reference to the ConfigurationContext?
>
>
> The correct ConfigurationContext is linked with the  MessageContext when
> the MessageContext is created. So there is no need to remove this method.
>
> > What is the scenario that you're trying to support?
>
> The ability to reload the configurations of a group of Axis2 nodes in a
> cluster without having to restart them one by one.
>
> > David
> >
> > >
> > > > David
> > > >
> > > > On 23/03/07, Deepal Jayasinghe <de...@opensource.lk> 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* < afkham@gmail.com <ma...@gmail.com>>
> > > > > > Date: Mar 23, 2007 11:49 AM
> > > > > > Subject: Re: Introducing
> > > > > >
> ConfigurationContextFactory.getConfigurationContext()
> > > > > > To: Apache AXIS C Developers List <axis-c-dev@ws.apache.org
> > > > > > <mailto: axis-c-dev@ws.apache.org>>
> > > > > >
> > > > > > Sorry. This was intended for the Axis2 Java Dev list.
> > > > > >
> > > > > > -- Azeez
> > > > > >
> > > > > >
> > > > > > On 3/23/07, *Afkham Azeez* < afkham@gmail.com
> > > > > > <mailto: 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
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Thanks
> > > Afkham Azeez
> > >
> > > http://www.wso2.org
> > >  GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
> >
> >
> > --
> > 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
> >
> >
>
>
>
> --
> Thanks
> Afkham Azeez
>
>  http://www.wso2.org
> GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext()

Posted by Afkham Azeez <af...@gmail.com>.
On 3/23/07, David Illsley <da...@gmail.com> wrote:
>
> On 23/03/07, Afkham Azeez <af...@gmail.com> wrote:
> >
> >
> > On 3/23/07, David Illsley <da...@gmail.com> 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?
>
> At the moment we can have more that 1 Axis2 instance running in a
> single JVM. I'd like to keep that capability and this proposal (I
> think) prevents that.


 I don't think this will be a case in a production setup. Simply put, we
need some method to ensure that all objects within an Axis2 runtime use the
same configuration context.

And yet you don't want to deprecate a method which returns a held
> reference to the ConfigurationContext?



The correct ConfigurationContext is linked with the  MessageContext when
the MessageContext is created. So there is no need to remove this method.

What is the scenario that you're trying to support?


The ability to reload the configurations of a group of Axis2 nodes in a
cluster without having to restart them one by one.

David
>
> >
> > > David
> > >
> > > On 23/03/07, Deepal Jayasinghe <de...@opensource.lk> 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* <afkham@gmail.com <ma...@gmail.com>>
> > > > > Date: Mar 23, 2007 11:49 AM
> > > > > Subject: Re: Introducing
> > > > > ConfigurationContextFactory.getConfigurationContext()
> > > > > To: Apache AXIS C Developers List <axis-c-dev@ws.apache.org
> > > > > <mailto: axis-c-dev@ws.apache.org>>
> > > > >
> > > > > Sorry. This was intended for the Axis2 Java Dev list.
> > > > >
> > > > > -- Azeez
> > > > >
> > > > >
> > > > > On 3/23/07, *Afkham Azeez* < afkham@gmail.com
> > > > > <ma...@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
> > >
> > >
> >
> >
> >
> > --
> > Thanks
> > Afkham Azeez
> >
> > http://www.wso2.org
> >  GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
>
>
> --
> 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
>
>


-- 
Thanks
Afkham Azeez

http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

Re: [Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext()

Posted by David Illsley <da...@gmail.com>.
On 23/03/07, Afkham Azeez <af...@gmail.com> wrote:
>
>
> On 3/23/07, David Illsley <da...@gmail.com> 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?

At the moment we can have more that 1 Axis2 instance running in a
single JVM. I'd like to keep that capability and this proposal (I
think) prevents that.

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

I don't understand your proposal states:
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.

And yet you don't want to deprecate a method which returns a held
reference to the ConfigurationContext?

I haven't dug into this fully but I'm not convinced at this point that
being able to sawp out an entire configuration from under a running
instance is something that is desirable. What is the scenario that
you're trying to support?

David

>
> > David
> >
> > On 23/03/07, Deepal Jayasinghe <de...@opensource.lk> 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* <afkham@gmail.com <ma...@gmail.com>>
> > > > Date: Mar 23, 2007 11:49 AM
> > > > Subject: Re: Introducing
> > > > ConfigurationContextFactory.getConfigurationContext()
> > > > To: Apache AXIS C Developers List <axis-c-dev@ws.apache.org
> > > > <mailto: axis-c-dev@ws.apache.org>>
> > > >
> > > > Sorry. This was intended for the Axis2 Java Dev list.
> > > >
> > > > -- Azeez
> > > >
> > > >
> > > > On 3/23/07, *Afkham Azeez* < afkham@gmail.com
> > > > <ma...@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
> >
> >
>
>
>
> --
> Thanks
> Afkham Azeez
>
> http://www.wso2.org
>  GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760


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


Re: [Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext()

Posted by Afkham Azeez <af...@gmail.com>.
On 3/23/07, David Illsley <da...@gmail.com> 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?

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 <de...@opensource.lk> 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* <afkham@gmail.com <ma...@gmail.com>>
> > > Date: Mar 23, 2007 11:49 AM
> > > Subject: Re: Introducing
> > > ConfigurationContextFactory.getConfigurationContext()
> > > To: Apache AXIS C Developers List <axis-c-dev@ws.apache.org
> > > <ma...@ws.apache.org>>
> > >
> > > Sorry. This was intended for the Axis2 Java Dev list.
> > >
> > > -- Azeez
> > >
> > >
> > > On 3/23/07, *Afkham Azeez* < afkham@gmail.com
> > > <ma...@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
>
>


-- 
Thanks
Afkham Azeez

http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

Re: [Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext()

Posted by David Illsley <da...@gmail.com>.
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 <de...@opensource.lk> 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* <afkham@gmail.com <ma...@gmail.com>>
> > Date: Mar 23, 2007 11:49 AM
> > Subject: Re: Introducing
> > ConfigurationContextFactory.getConfigurationContext()
> > To: Apache AXIS C Developers List <axis-c-dev@ws.apache.org
> > <ma...@ws.apache.org>>
> >
> > Sorry. This was intended for the Axis2 Java Dev list.
> >
> > -- Azeez
> >
> >
> > On 3/23/07, *Afkham Azeez* < afkham@gmail.com
> > <ma...@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


Re: [Axis2] Fwd: Introducing ConfigurationContextFactory.getConfigurationContext()

Posted by Deepal Jayasinghe <de...@opensource.lk>.
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* <afkham@gmail.com <ma...@gmail.com>>
> Date: Mar 23, 2007 11:49 AM
> Subject: Re: Introducing
> ConfigurationContextFactory.getConfigurationContext()
> To: Apache AXIS C Developers List <axis-c-dev@ws.apache.org
> <ma...@ws.apache.org>>
>
> Sorry. This was intended for the Axis2 Java Dev list.
>
> -- Azeez
>
>
> On 3/23/07, *Afkham Azeez* < afkham@gmail.com
> <ma...@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