Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-682

Allow unregistration of CDI beans at run time, through API

    Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.Final
    • Fix Version/s: None
    • Component/s: Beans, Events, Interceptors
    • Labels:
      None

      Description

      much like the ability to register beans at runtime through API (https://issues.jboss.org/browse/CDI-114)

      also provide API

      BeanManager::unregister("beanName"), or BeanManager::unregister(XYZBean.class)

      to unregister beans at runtime, and corresponding events (BeforeUnregisteringBean, AfterUnregisteringBean, etc) so that interested listeners can take appropriate actions in the event of a bean getting removed from CDI context.

      these two together will help build pluggable web applications much like OSGI modules. right now, installing new beans or removing exiting beans requires restart of CDI container, if not web application. with the addition of these two features [registering beans at run time, through BeanManager::register(XYZBean.class) ], and unregistering beans at runtime [BeanManager::unregister(XYZBean.class) ] true modularity comes to Java EE world, without the necessity to restart

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                saasira Samba Kolusu
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: