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

Cache whether @Initialized and @Destroyed get used at all in an app

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.6.0
    • Component/s: Context and Scopes
    • Labels:
      None

      Description

      Since CDI-1.1 the container has to fire @Initialized(ApplicationScoped.class), @Initialized(RequestScoped.class), etc. The same is needed for @Destroyed.

      But if an application doesn't use e.g. @Initialized(RequestScoped.class) at all, then we also do not need to fire this event.
      So we should detect at bootstrap whether those events get used in the customer application at all (BeanManager#resolveObserverMethods) and suppress firing those events if not needed.

        Attachments

          Activity

            People

            • Assignee:
              struberg Mark Struberg
              Reporter:
              struberg Mark Struberg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: