At 04:11 PM 6/14/2002 +0200, you wrote:
>Leo Sutic wrote:
>
> > A lookup failing is an exceptional
> > case, and should be treated as such.
>
>I think this is the key issuse here.
>
>Example, I might change the behavior of a component, if another
>component it requires is missing (this happens in Cocoon a lot)
>
>This is *not* an exceptional case, but a straightforward programming
>flow.
It is a design choice cocoon has made in the context of a specific
container. You could quite easily use "boolean hasComponent(String)" to
check before doing a lookup. A lot of the problems in cocoon relate to the
fact that there is a merging of concepts between Container and
ComponentManager. In reality the container should map from application
namespace into component namespace and components should only access
component namespace. If you do that and then use hasComponent() method then
most (all?) of this ugly code disapears. I believe thats what Leo wants to
do with Fortress.
ie You desiigned your system to work this way. ComponentException is a
system exception not an application system and should be handled by the
container not by individual component. Receiving a ComponentException
should mean that the whole component is fubared.
Cheers,
Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
- John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>