You are right, and actually the container (ECM in this case) does not
make the component available if it throws a configure exception (which
it will). Let me try this another way :-)
Maybe this isn't 'right', but if one component fails, then I would like
the whole container to not service anything. Basically say that the
container didn't configure because of component XYZ not configuring. I'm
sure that breaks some contract or other, as it makes the container
dependant on the components it is containing. I'm sure I can do a
workaround, but just haven't gotten to it yet.

I really don't want to make one super component as it would be really
ugly and wouldn't really 'fit'. Besides, I use the Excalibur connection
pooling :-)

In any event, I'm by no means complaining about Avalon!! I really love
it actually. Just thinking out loud I guess.

I appreciate all the thoughts though!

- Robert

-----Original Message-----
From: Leo Simons [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 17, 2002 2:58 PM
To: Avalon Developers List
Subject: RE: Migrating from ECM

> 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:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to