Daniel Dekany wrote:
Monday, December 15, 2003, 2:00:11 PM, Leo Simons wrote:
Daniel Dekany wrote:
[snip]
= what about Releaseable, ReleaseRequired, ReleaseUtil? =
Been there, done that, won't work. Marking components as releasable will
just mean you'll be checking whether they're marked as such, which is just as ugly.
Note that I have recommended something different.
I think it was Niclas who wrote a ReleaseRequirement class, innit?
I said that the component returned for certain Roles are always must be "explicitly released" (and, only allowed to be looked up with ServiceManager.lookupAndHold), while others don't even allow explicit releasing (and ServiceManager.lookupAndHold). The client code will never check any markers. It's just known by the programmer, who writes the client code, that this and that Role uses explicit releasing.
that's a different "no-can-do" pattern @ avalon, which basically revolves around associating metadata with/adding metadata to the role. This is not good; roles should be opaque strings. That's another of those looooooong arguments :D
Regardless of that...consider:
How can you trust a programmer to read and always follow the docs you write about when to and when not to release if you can't trust him to do the release in the first place?
I'm not saying the ideas are bad, but that the implementation of them and the implications of them result in various side effects and/or impact consistency in a way that we generally don't feel like doing @ avalon.
cheers!
- LSD
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
