Done (JIRA 2785). I've just added a link to this thread.
>From my point of view the best choice is always the use of an interface,
because it's like a contract stipulating which features are provided.


Michele

On Fri, 2007-06-08 at 08:56 -0400, Davanum Srinivas wrote:
> Michele,
> 
> Let's file a jira enhancement issue and start again. There are many
> points of view there on "How to do the right thing" and "What's the
> right thing" :) Yes i agree, annotations are an option as well. So far
> the choices are (from a user pov)
> 
> - User just adds methods with specific signatures
> - User an interface which has specific methods which he then needs to 
> implement
> - User adds an annotation (class-level?, method-level?)
> 
> We would also need to worry about what users are using right now and
> how to keep backward compat.
> 
> thanks,
> dims
> 
> On 6/8/07, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
> > Dims,
> >
> > so it ends up I do agree with you and disagree with Sanjiva. The method
> > is actually called *only* if the service class implements the
> > InitDestroy interface, it doesn't mean doing both!
> > I think this is the right way to do things, first of all to keep them
> > simple. In alternative what about using annotations (but it requires
> > java 5)?
> >
> >
> > Michele
> >
> > On Fri, 2007-06-08 at 08:25 -0400, Davanum Srinivas wrote:
> > > Michele,
> > >
> > > see this - http://marc.info/?l=axis-dev&m=115854567122915&w=2
> > >
> > > -- dims
> > >
> > > On 6/8/07, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
> > > > Dims,
> > > >
> > > > thanks for the link, but I can't see where the problem is. At present
> > > > you use reflection to invoke the init() and destroy() methods, it does
> > > > not matter whether the service class provides them or not (that's why
> > > > Swavek got the error). A cleverer way would be:
> > > > 1- to create a simple interface, let's call it InitDestroy providing
> > > > those two methods
> > > > 2 - to use reflection and call those methods only if the service class
> > > > implements InitDestroy (once you have a Class object c simply call
> > > > c.getInterfaces)
> > > >
> > > >
> > > > Michele
> > > >
> > > > On Fri, 2007-06-08 at 07:04 -0400, Davanum Srinivas wrote:
> > > > > Michele,
> > > > >
> > > > > Do you want to restart the discussion on [EMAIL PROTECTED] :) Please 
> > > > > read
> > > > > this thread first:
> > > > > http://marc.info/?t=115829377800001&r=1&w=2
> > > > >
> > > > > thanks,
> > > > > dims
> > > > >
> > > > > On 6/8/07, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
> > > > > > Swavek,
> > > > > >
> > > > > > the init and destroy methods are called using reflection. They are 
> > > > > > not
> > > > > > compulsory, but if present they are used to initialized and tear 
> > > > > > down
> > > > > > resources. You see the exception because you have not implemented 
> > > > > > them.
> > > > > > The simplest workaround is to add the empty methods to your service
> > > > > > class:
> > > > > >
> > > > > > public void init(ServiceContext serviceContext) {
> > > > > >         // empty
> > > > > > }
> > > > > >
> > > > > > public void destroy(ServiceContext serviceContext) {
> > > > > >         // empty
> > > > > > }
> > > > > >
> > > > > >
> > > > > > Dims, for what concerns your previous post [1] and my comment, as 
> > > > > > you
> > > > > > can see replacing reflection with a simple interface would avoid 
> > > > > > this
> > > > > > kind of problems.
> > > > > >
> > > > > >
> > > > > > Michele
> > > > > >
> > > > > >
> > > > > > [1]http://www.nabble.com/Thread-on-TSS---%
> > > > > > 22Any-good-experience-with-Axis2-%22-tf3881517.html
> > > > > >
> > > > > > On Thu, 2007-06-07 at 17:32 -0600, Swavek Skret wrote:
> > > > > > > I am getting the following exception on the SOAP server side when 
> > > > > > > the SOAP
> > > > > > > client calls:
> > > > > > >
> > > > > > > 2007-06-07 17:18:36,907 DEBUG 
> > > > > > > org.apache.axis2.engine.DependencyManager -
> > > > > > > Exception trying to call init: java.lang.NoSuchMethodException:...
> > > > > > >
> > > > > > > It shows only as Debug level. Is that OK?
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Swavek
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > > >
> > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 


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

Reply via email to