To be clear... its not that the chain is not considered. The problem all along has been an open question in the design of the registries. Namely can registries be reused as the parent of multiple child repositories. For example, take the BootstrapServiceRegistry.. given this: {code} BootstrapServiceRegistry bsr = ...; new SomeServiceRegistry( bsr, ... ); new SomeOtherServiceRegistry( bsr, ... ); new YetAnotherServiceRegistry( bsr, ... ); {code}
Closing the BootstrapServiceRegistry when we close one of the "other" registries is bad.
So the first question is a design question, and whether it makes sense to allow registry reuse as parent in multiple registries. Personally, I think that does make sense. So given that, the question moves to a practical question of how to know when all references to a registry are down done with it, which comes down to reference counting or somesuch solution.
|