[picocontainer-dev] A way forward for annotations in Pico codebase

Paul Hammant <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Erik,

We see two sides to your code (1) the @nnotations stuff (2) the  
generics stuff.

Can we set you a challenge?

Rework the annotations work to fit the following goals -

   * work with an unextended DefaultPicoContainer
   * implemented as a ComponentAdapterFactory and ComponentAdapter  
(which can extend/reuse existing classes)
   * will introduce @inject

Leave off the following for now - we'll debate them later -

   * @singleton
   * @implementedBy

Also leave drop the automatic capability for a component to depend on  
the container that registers it.  For now can you live with something  
like -

   pico.registerComponentInstance(PicoContainer.class, pico);
   pico.registerComponentInstance(NeedsTheContainerThatMadeIt.class);

Lastly, we'll address all generics and other Java5 aspects shortly -  
so please ignore that too.

We like this approach because its more evolutionary :-)

We think also, there might be a subtle bug in 'injectDependencies' in  
InjectingComponentAdapter.  In complex cases PicoContainer works out  
the order of instantiation first (directive graph of component deps)  
then executes that plan.  If it finds circular deps if barfs early.   
Yours we think might fail for complex dependency situations - though  
we have yet to write a test case that proves it.

- Paul

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.