avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: ExcaliburComponentManager.hasComponent()
Date Fri, 12 Apr 2002 12:46:15 GMT
Ole Bulbuk wrote:
> Hi,
> 
> according to some stack traces hasComponent() is calling lookup() and
> release(). There seems to be a lot of unnecessary work done. And a later
> lookup() (e.g. if hasComponent() returned true) seems to return a disposed
> component.

Do you have an older version of ECM in your classpath somewhere?  That
*used* to be how hasComponent() was implemented--but that has changed.

> This gives serious problems to my application. And it disagrees with the
> source code (both from the Excalibur 4.1 distribution:
> 
>     public boolean hasComponent( final String role )
>     {
>         if ( ! m_initialized ) return false;
>         if ( m_disposed ) return false;
> 
>         boolean exists = m_componentHandlers.containsKey( role );
> 
>         if ( ! exists  && null != m_parentManager )
>         {
>             exists = m_parentManager.hasComponent( role );
>         }
> 
>         return exists;
>     }
> 
> I would like to know wether the class file or the source code are more up to
> date and of course I would like to have them both to fit together.
> 
> I would be thankful if somebody could help me.

The SourceCode is more up to date in this case.

I can't wait until we do an Excalibur release....

-- 

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


Mime
View raw message