Hi folks!

We're trying to resolve https://issues.apache.org/jira/browse/AXIS2-2785 here at the hackathon. (see conversation at http://www.nabble.com/java.lang.NoSuchMethodException-tf3886972.html if you're interested)

What it comes down to is this. Currently DependencyManager (why the heck is this called "DependencyManager"? It doesn't manage anything, and-- ok, that's another issue :)) is introspecting the service class to find the init(ServiceContext) and destroy(ServiceContext) methods. It has been suggested that instead of introspecting, we could simply have the service author optionally implement ServiceLifecycle, an interface containing these two methods. Then all the introspection code would go away to be replaced with code like:

  if (serviceObject instanceof ServiceLifecycle) {
    ((ServiceLifecycle)serviceObject).init(serviceContext);
  }

Advantages - faster. Simpler. Less error-prone for developers (IDEs will help you implement the interface).

So my proposal is that we do the following:

1) Add ServiceLifcycle interface, and code like the above.  Also leave
   the introspection code for now.
2) Put a BIG BOLD notice in the release notes that we are now using
   the interface and you should switch to that rather than relying on
   method introspection.
3) Remove introspection code in 1.X (where X=4 or 5)

Here's my +1.  Are people OK with moving forward with this solution?

Thanks,
--Glen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to