avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: [Bug?]: ExcaliburComponentManager ignoring Exceptions
Date Tue, 23 Apr 2002 14:08:54 GMT

Berin Loritsch wrote:
> Carsten Ziegeler wrote:
> > Peter Donald wrote:
> >
> >>On Tue, 23 Apr 2002 20:21, Carsten Ziegeler wrote:
> >>
> >>>In my case the parent CM catches the NPE of the component and
> >>>rethrows it as a ComponentException. So if I change the above
> >>>line to catch only ComponentExceptions it's not better.
> >>>
> >>>What about changing it to:
> >>>
> >>>if( m_parentManager != null && m_parentManager.hasComponent( role
) )
> >>>{
> >>>    return parentManager.lookup( role );
> >>>}
> >>
> >>+1 from me - but then again I don't use the ECM :)
> >>
> >
> > Sorry for my english, but do you mean, you will not use the ECM *if* I
> > change the code? Or do you mean, you don't use the ECM at all?
> He means he does not currently use the code, and has no plans to.
> He is not saying anything about the life of the code.
Thanks, Berin.

I'm currently totally confused about the ECM code. If you look at the
lookup method and compare it with the hasComponent() method, I see
a big difference.

The hasComponent() only tests if the handler for the role is available
and if not passes the request on to the parent CM.
The lookup method tests if it has a handler, if not uses the parent CM
and if the parent is not able to serve the request, the strange part
begins. It starts with:
            if( null != m_roles )
                final String className =
m_roles.getDefaultClassNameForRole( role );
Why is this only in the lookup method, but not in the hasComponent()?

PS: It's not my best day today, so sorry if I ask dumb questions.


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