Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-1061

Surplus and missing @Initialized and @Destroyed events

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.6.0
    • Lifecycle
    • None

    Description

      Scenario

      There is a bean with two observer methods observing @Initialized(ApplicationScoped.class) and @Destroyed(ApplicationScoped.class) in a stand-alone CDI container launched via deltaspike-cdictrl-owb, for lack of a native OWB API.

      The container is started and stopped as follows:

              CdiContainer container = CdiContainerLoader.getCdiContainer();
              container.boot();
              container.getContextControl().startContexts();
              container.getContextControl().stopContexts();
              container.shutdown();
      

      Expected behaviour

      The @Initialized and @Destroyed events are observed once each, in this order.

      (Weld 2.2.11.Final does behave as expected, both via deltaspike-cdictrl-weld, and using the native Weld SE API.)

      Actual behaviour

      The @Initialized event is observed three times, twice on startup, once on shutdown. The @Destroyed event is not observed at all.

      Attachments

        1. lifecycle-event.zip
          5 kB
          Harald Wellmann

        Activity

          People

            struberg Mark Struberg
            hwellmann Harald Wellmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: