avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Use of ComponentStateValidator in ContainerManager
Date Fri, 08 Feb 2002 13:49:26 GMT
Leif Mortenson wrote:
> I was looking at the new ContainerManager. It is currently making use of
> the ComponentStateValidator to validate that the managed container is
> being started correctly.
> I am 100% in favor of using the ComponentStateValidator in places where
> it is possible for a user, through the use of invalid code, attempt to
> initialize or use a component incorrectly. But in this case, the
> ContainerManager will be a core class and we know that it will always
> correctly follow the Component contracts when initializing the
> container. So I don't think it is really needed here.
> I might have missed something in the design though, :-)

First, it doesn't hurt.
Second, I did make some mistakes that are ironed out when I was coding blind.
(Yes the original implementation of ComponentManager was coded all by theory
with no testing--not the ideal).

I was also going to have AbstractContainer use the ComponentStateValidator,
but it becomes a pain if you extend the class and add more Lifecycle interfaces.
We could apply root implementations, but then we are counting on the child to
use super.{lifecycle}() which is not optimal either.

Seriously, I would rather have code that is checked and double checked than
risk abnormally running components.


"They that give up essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety."
                - Benjamin Franklin

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

View raw message