This makes perfect sense to me.  This is how I thought it should have been from 
the start.

I started working with service lifecycle from the start and initially all that 
was available was init() and destroy().  If there had been a lifecycle 
interface that I was required to implement, when things changed to 
init(ServiceContext), destroy(ServiceContext), and 
setOperationContext(OperationContext), I would have been warned about it at 
compile time and not wondering why my old init() code wasn't being called at 
runtime.

-Tony

-----Original Message-----
From: Eran Chinthaka [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 14, 2006 8:06 AM
To: [email protected]
Subject: Re: AW: How to access the SOAPHeader

Rodrigo Ruiz wrote:
> Mmm, yes of course. But I guess you are talking about a mandatory 
> interface, like Remote. I am talking about an optional one, like 
> LifeCycle. For example:
> 
> public interface ContextAware {
>   void setOperationContext(OperationContext ctx); }
> 
> In this case, only those services interested in having this data will 
> need to implement it. The rest can work just like now.
> 
> Such an interface would make reflection/introspection unnecessary, and 
> the relationship with Axis2 more explicit.

Hmm, now it makes sense to me :). I can remember there was a discussion on the 
same topic some time back, on this list, but can not remember what happened to 
it.

What do the others think about this? Can I implement this?

For the time being, lets leave the dependency injection for the existing code 
to work and implement this as well.

Comments ?

-- Chinthaka


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

Reply via email to