axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chamikara Jayalath" <chamikar...@gmail.com>
Subject Re: [axis2] ContextFactory - get rid of it?
Date Fri, 04 May 2007 19:11:16 GMT
Hi Dims,

On 5/4/07, Davanum Srinivas <davanum@gmail.com> wrote:
>
> Chamikara,
>
> What do they say about premature optimization? :)



Good point :-)
So lets do it the correct way.

Chamikara



-- dims
>
> On 5/4/07, Chamikara Jayalath <chamikaramj@gmail.com> wrote:
> > Hi Glen, Deepal,
> >
> > All we needed was a way to get notified when a certain context get
> created
> > in the system. I think we didn't go for the ContextListener method becoz
> of
> > possible performance drawbacks. But it absolutely was my preference.
> Would
> > be glad if we can get that introduced.
> >
> > Chamikara
> >
> >
> >
> > On 5/4/07, Glen Daniels <glen@thoughtcraft.com> wrote:
> > > Deepal Jayasinghe wrote:
> > > > I really like the idea, but one of the reason to introduce that
> factory
> > > > was to support clustering requirements. They wanted to have a single
> > > > place of creating all the Contexts , then they have only one place
> to
> > > > worry about. They wanted to have some triggering mechanism when when
> > > > creating Contexts that is why we introduced that.
> > >
> > > Hm... and yet that doesn't seem to happen, because everything right
> now
> > > uses ContextFactory directly, and I don't see any hooks in there for
> > > supporting notifications, just a bunch of static methods.  ?
> > >
> > > I'll go read those threads (thanks for the pointers), but I think
> there
> > > are perhaps better ways to achieve the goals than a static factory
> > > class, depending on exactly what the requirements are.  For example:
> > >
> > > ConfigurationContext {
> > >      public void setContextListener(ContextListener);
> > > }
> > >
> > > then every sub-context create method does something like this:
> > >
> > > ServiceContext {
> > >    public OperationContext createOpContext(AxisOperation) {
> > >      if (myConfigContext.hasContextListener()) {
> > >        // Either ask the listener to get the context itself,
> > >        // or just notify it, etc... then return it.
> > >      } else {
> > >        return new OperationContext(AxisOperation, this);
> > >      }
> > >    }
> > > }
> > >
> > > Thanks,
> > > --Glen
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Chamikara Jayalath
> > WSO2 Inc.
> > http://wso2.com/
> > http://wso2.org/ - For your Oxygen needs
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Chamikara Jayalath
WSO2 Inc.
http://wso2.com/
http://wso2.org/ - For your Oxygen needs

Mime
View raw message