Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: core
-
Labels:None
-
Number of attachments :
Description
As discussed with Aslak and Paul (11/23/2004)...
We agreed there are cases where it is desirable for PicoContainer to self-register itself and become available for injection into child components. The guard code that used to prevent this operation from being done manually has been removed by Paul (see PICO-226).
Instead of introducing a ContainerExposingPicoContainer into Pico and having to specify it as the container-implementation, we will add an optional register-self attribute to the scripting system. This attribute will cause nano to register the container within itself.
Example:
<container register-self=true>
<component-implementation class='org.nanocontainer.testmodel.DefaultWebServerConfig'/> ...
Activity

Field | Original Value | New Value |
---|---|---|
Attachment | NANO-110.patch [ 13483 ] |

Attachment | TestDependsOnPicoContainer.java [ 13484 ] |

-
- Time Spent:
- 8 hours
- Some of this time was spent pairing with Aslak on fixing the infinite loop in the container lifecycle that resulted from being able to self-register.

Remaining Estimate | 2 days [ 172800 ] | 0 minutes [ 0 ] |
Time Spent | 8 hours [ 28800 ] |

The patch to allow self-registration. There is one new class in testmodel, which I will attach next.