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]

Reply via email to