If we are not using the interface, we had to do reflection and check does method exists and act accordingly. AFAIK, both spring and EJB use reflection for support these features.
There if we think reflection is too expensive, we should use interface. so I am +1 on interface. Thanks Srinath On 6/15/07, Davanum Srinivas <[EMAIL PROTECTED]> wrote:
As stated on axis-user, +1 from me. thanks, dims On 6/14/07, Glen Daniels <[EMAIL PROTECTED]> wrote: > 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] > > -- Davanum Srinivas :: http://davanum.wordpress.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- ============================ Srinath Perera: Indiana University, Bloomington http://www.cs.indiana.edu/~hperera/ http://www.bloglines.com/blog/hemapani --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
