Details
-
Type: Improvement
-
Status: Closed
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-5
-
Fix Version/s: 1.0-beta-4
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Number of attachments :
Description
There is one single thing that is worse than a two-way relationship, and that is a many-to-many two-way relationship. PicoContainer currently has both. (A container can have several parents.)
The amount of code needed to maintain this relationship is actually a large percentage of the entire PicoContainer!!
If someone really, really needs it state your reasons here. I think it can (and should) be solved as a PicoExtra-extension to the default PicoContainer.
Related to PICO-92.
This needs to be resolved before 1.0.
Activity
Jon Tirsen
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.0-beta-4 [ 10412 ] | |
Fix Version/s | 1.0 [ 10145 ] |
Jon Tirsen
made changes -
Component/s | Core (Java) [ 10191 ] |
Jon Tirsen
made changes -
Assignee | Jon Tirsen [ tirsen ] |
Aslak Hellesøy
made changes -
Assignee | Jon Tirsen [ tirsen ] | Aslak Hellesoy [ rinkrank ] |
Aslak Hellesøy
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Aslak Hellesøy
made changes -
Status | In Progress [ 3 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |
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.