Multiple parents is vital.
Example: I have an avalon-fortress container holding avalon components, a spring factory holding javabeans, an eob container holding enterprise objects, a pico container holding type 3 objects.
I really want the ability to aggregate these together and use them as one container. The only way that's currently feasible with pico is to use them as parents:
public void testMultipleParents()
{
Container fc = getFortressContainer();
PicoContainer pfc = getPicoContainer( fc );
BeansFactory bf = getSpringBeanFactory();
PicoContainer pbf = getPicoContainer( bf );
BeanBroker bb = getBeanBroker();
PicoContainer pbb = getPicoContainer( bb );
MutablePicoContainer c = getPicoContainer();
c.addParent( pfc );
c.addParent( pbf );
c.addParent( pbb );
// can now access things from c, fc, bf and bb through
// my 'c' reference
}
do note that it is possible to remove the notion of hierarchies but retain this use case. But that will require significant refactoring. See my comments in PICO-90, PICO-91 and from Thomas on the mailing list.
Multiple parents is vital.
Example: I have an avalon-fortress container holding avalon components, a spring factory holding javabeans, an eob container holding enterprise objects, a pico container holding type 3 objects.
I really want the ability to aggregate these together and use them as one container. The only way that's currently feasible with pico is to use them as parents:
public void testMultipleParents()
{ Container fc = getFortressContainer(); PicoContainer pfc = getPicoContainer( fc ); BeansFactory bf = getSpringBeanFactory(); PicoContainer pbf = getPicoContainer( bf ); BeanBroker bb = getBeanBroker(); PicoContainer pbb = getPicoContainer( bb ); MutablePicoContainer c = getPicoContainer(); c.addParent( pfc ); c.addParent( pbf ); c.addParent( pbb ); // can now access things from c, fc, bf and bb through // my 'c' reference }do note that it is possible to remove the notion of hierarchies but retain this use case. But that will require significant refactoring. See my comments in
PICO-90, PICO-91 and from Thomas on the mailing list.