avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject RE: [proposal] custom component lookup
Date Thu, 20 Jun 2002 22:34:11 GMT
> From: Robert Mouat [mailto:robert@mouat.net] 
> 
> Michael McKibben wrote:
> 
> > Isn't this a chicken-and-the-egg problem? The CM must know which 
> > component instance to call lookup() on! Perhaps if it was a static 
> > method that was introspected, but I'm not sure that is a viable 
> > solution. JNDI has some nifty solutions that might be possible to 
> > borrow from, e.g. the Referenceable interface and the 
> > ObjectFactory/ObjectFactoryBuilder.
> 
> that's why I suggested that they be singletons (i.e. only one 
> instance of the component).
> 
> however - even if they were given some other lifestyle it 
> would still work, there would just be redundant instances.


Keep in mind that there are ways of creating singletons without static
accessors.  However that gets back to the ThreadSafe argument, which
is what we are wanting to solve.  Meta Data is the best way of doing
this.


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