Chamikara,
What do they say about premature optimization? :)
-- dims
On 5/4/07, Chamikara Jayalath <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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:
[EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Chamikara Jayalath
WSO2 Inc.
http://wso2.com/
http://wso2.org/ - For your Oxygen needs
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]