jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • PicoContainer
  • PICO-193

Components should not get a ref to the Container that instantiates them via their ctor.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Thomas Heller added a comment - 05/Jun/04 11:14 PM

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.

Show
Thomas Heller added a comment - 05/Jun/04 11:14 PM 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.
Hide
Permalink
Paul Hammant added a comment - 06/Jun/04 10:02 AM

Fixed for 1.1-SNAPSHOT. There will be knock on effects for thescriptable NanoContainer impls. It won't be too much of a problem to upgrade them too.

Show
Paul Hammant added a comment - 06/Jun/04 10:02 AM Fixed for 1.1-SNAPSHOT. There will be knock on effects for thescriptable NanoContainer impls. It won't be too much of a problem to upgrade them too.
Hide
Permalink
Aslak Hellesøy added a comment - 08/Jun/04 5:36 AM

http://www.picocontainer.org/Five+minute+introduction is out of date (lying). Can you fix that too?

Show
Aslak Hellesøy added a comment - 08/Jun/04 5:36 AM http://www.picocontainer.org/Five+minute+introduction is out of date (lying). Can you fix that too?

People

  • Assignee:
    Paul Hammant
    Reporter:
    Paul Hammant
Vote (0)
Watch (0)

Dates

  • Created:
    05/Jun/04 10:08 PM
    Updated:
    31/Oct/04 6:52 PM
    Resolved:
    31/Oct/04 6:52 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.