Kai Runte
2009-04-07 15:57:26 UTC
Hallo,
I'm new to picocontainer and just managed my first steps using a
FactoryInjector:
final MutablePicoContainer pico = new DefaultPicoContainer();
pico.addComponent(Echo2FilterGroupHandler.class);
pico.addAdapter(new Echo2FilterCollectionHandlerFactory());
final Echo2FilterGroupHandler filterGroupHandler =
pico.getComponent(Echo2FilterGroupHandler.class);
Works like a charm, so far so great. :-)
Now I would to store the above setup in an XML file and load it using
picocontainer-script XML, but have failed miserably to define the
Echo2FilterCollectionHandlerFactory (extends
FactoryInjector<Echo2FilterCollectionHandler>). So far I got this:
<container>
<component-adapter-factory key="factory"
class="handler.Echo2FilterCollectionHandlerFactory">
</component-adapter-factory>
<component-implementation
key="handler.Echo2FilterGroupHandler"
class="handler.Echo2FilterGroupHandler">
</component-implementation>
</container>
but I don't know how I connect the factory to Echo2FilterGroupHandler class.
Any help is greatly appreciated!
Thanks
Kai
I'm new to picocontainer and just managed my first steps using a
FactoryInjector:
final MutablePicoContainer pico = new DefaultPicoContainer();
pico.addComponent(Echo2FilterGroupHandler.class);
pico.addAdapter(new Echo2FilterCollectionHandlerFactory());
final Echo2FilterGroupHandler filterGroupHandler =
pico.getComponent(Echo2FilterGroupHandler.class);
Works like a charm, so far so great. :-)
Now I would to store the above setup in an XML file and load it using
picocontainer-script XML, but have failed miserably to define the
Echo2FilterCollectionHandlerFactory (extends
FactoryInjector<Echo2FilterCollectionHandler>). So far I got this:
<container>
<component-adapter-factory key="factory"
class="handler.Echo2FilterCollectionHandlerFactory">
</component-adapter-factory>
<component-implementation
key="handler.Echo2FilterGroupHandler"
class="handler.Echo2FilterGroupHandler">
</component-implementation>
</container>
but I don't know how I connect the factory to Echo2FilterGroupHandler class.
Any help is greatly appreciated!
Thanks
Kai
--
View this message in context: http://www.nabble.com/FactoryInjector-in-picocontainer-script-XML-tp22932368p22932368.html
Sent from the NanoContainer - PicoContainer - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
View this message in context: http://www.nabble.com/FactoryInjector-in-picocontainer-script-XML-tp22932368p22932368.html
Sent from the NanoContainer - PicoContainer - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email