Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0
-
Fix Version/s: 1.1
-
Component/s: None
-
Labels:None
Description
class CompA {
ClassA(PicoContainer pc) {
// whoa, if registered with DefaultPicoContainer, this
will get a handle on that PC itself. Waaay bad.
}
}
People with complex needs should explicitly place an (arbitary) PicoContainer into another via registerComponentInstance(..). I do this in Jesktop and EnterpriseObjectBroker and do not want hosted component makers to have a hook to my kernel.
I hope I do not have to explain this one ...
It will take a long time.
http://lists.codehaus.org/pipermail/picocontainer-dev/2004-April/003295.html
Is that close to what you mean?
I mean I aggree that it should be impossible (unless manually enabled) to get an instance of the hosting container in the ctor.