PicoContainer
  1. PicoContainer
  2. PICO-292

start fails on DefaultPicoContainer if the container has been self registered

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      public void testLifecycleWhenSelfRegistered()

      { DefaultPicoContainer parent = new DefaultPicoContainer(); parent.registerComponentInstance(parent); parent.start(); // fails on latest parent.stop(); parent.dispose(); }

      solution
      private class OrderedComponentAdapterLifecycleManager
      ...
      public void start(PicoContainer node) {
      ...
      if (manager.hasLifecycle())

      { // create an instance, it will be added to the ordered CA list Object inst = adapter.getComponentInstance(node); if (inst != DefaultPicoContainer.this) addOrderedComponentAdapter(adapter); }

        People

        • Assignee:
          Paul Hammant
          Reporter:
          Erik Putrycz
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Time Tracking

            Estimated:
            Original Estimate - 5 minutes
            5m
            Remaining:
            Remaining Estimate - 5 minutes
            5m
            Logged:
            Time Spent - Not Specified
            Not Specified