avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <leosim...@apache.org>
Subject RE: Migrating from ECM
Date Wed, 17 Jul 2002 19:57:33 GMT
> One problem I have right now is that if one of my components does not
> configure properly, I have no real way of 'knowing' this from other
> components or the container. I'm using 4 components right now and they
> are all interdependent at some level. In a nutshell what would be nice
> is that if a component does not configure the container/service manager,
> etc would know about and not allow it to be active. This might break a
> few rules and from what I know right now, there is no callback from the
> component to say "I'm not ready/configured".

The avalon contract is that the container at some points calls
configure(), parameterize(), contextualize(), initialize(), etc(), on
the component. After that point, the component _has_ to be configured
and ready. If it fails to do so, it should throw an exception at the
point it fails. The container should then invalidate the component, and
the component should not be made available through the ServiceManager.

To have the component 'tell' the container at some later point that it
is 'not ready' seems to me like it would be subversion of control. Using
an analogy: when the commanding officer says 'attention', the soldier is
not allowed to say 'stand down' to himself.

If all this is not possible because of some circular dependency or
something similar, it seems to me like either

1) you need to refactor your system
2) you need to throw all the circular dependency stuff together and weld
it into one component

Then again, I'm probably missing the point....

best regards,

- Leo



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