cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Unico Hommes <un...@hippo.nl>
Subject Re: NPE on shutdown
Date Mon, 17 May 2004 16:48:09 GMT
Vadim Gritsenko <vadim <at> reverycodes.com> writes:

 > Unico Hommes wrote:
 >  
 > >I'd swallow the NPE in TreeProcessor since the contract in ECM seems 
to be that
 > >dependent components might already have been disposed of.

This should have read: "... the contract in ECM seems to be that dependent
components might already have been disposed of *during the disposal 
stage of the
depending component*.

It means that, if you have a ThreadSafe component that depends on another
ThreadSafe component (and caches that component for the duration of its 
life)
it cannot be guaranteed that it can use it inside dispose() method, it might
have been disposed of already.

 > Why in tree processor and not in CocoonComponentManager itself?
 > Otherwise, you'd end up with hunting down all manager.release()
 > statements and wrapping them in the try/catch block - otherwise you
 > can't be sure will release() work or throw an exception.

But it's only an issue during disposal stage.

--
Unico


Mime
View raw message