avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Shaw <r...@silveregg.co.jp>
Subject Re: Avoiding disposal of unreleased components at system shutdown
Date Thu, 14 Feb 2002 06:34:52 GMT
Peter wrote:

||| > As long as components are looked up and released in the initialize and
||| > dispose methods you shouldn't be able to get into any circular
||| > dependency problems.
||| 
||| Theres no need to ever release the components if you are using it in this 
||| fashion. The container can record which components are requested and 
||| automatically release them when destroying the component (this is what 
||| phoenix does because it makes it easier for block writer).

how would the container know which components had looked up which
other components? 

suppose component X looks up component Y but never releases it.

when disposing of X, the container knows that Y is "checked out" 
but it doesn't necessarily know that X is the component that has
it checked out.

unless you are suggesting the interface be changed to include a
callback reference to the requesting component.

ryan


--
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