avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: [VOTE] ComponentValidator
Date Thu, 06 Dec 2001 04:38:56 GMT
On Thu, 6 Dec 2001 15:22, Peter Donald wrote:
> > Again, the most useful aspect of the ComponentValidator (IMO) is the
> > checkActive() function.  ComponentValidator.checkActive() and it's cousin
> > ComponentValidator.isActive() are used to make sure that the Component is
> > not used _before_ it's container is finished initializing it or _after_
> > it's container has disposed of it.
>
> Again - this is something that should be done in the container. Phoenixs
> proxys are not made accessible before the component is ready to accept
> requests and just before the component is about to be shutdown the proxy
> will be invalidated.
>
> Anyone calling a method after invalidation will get an
> IllegalStateException thrown that saids "you are using a service after it
> has shutdown - naughty, very naughty!"
>
> Again this way the component never has to worry about it and it is up to
> the conainer to validate and maintain correct lifecycle management and you
> aren't mixing concerns.

The only thing the component needs to worry about is making sure that its 
work interface is correctly guarded and I have no problem with that.

-- 
Cheers,

Pete

------------------------------------------
I just hate 'yes' men, don't you Smithers?
------------------------------------------

--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message