Module jakarta.cdi

Interface AfterBeanDiscovery


public interface AfterBeanDiscovery

The event type of the second event fired by the container when it has fully completed the bean discovery process, validated that there are no definition errors relating to the discovered beans, and registered Bean and ObserverMethod objects for the discovered beans, but before detecting deployment problems.

A portable extension may take advantage of this event to register beans, interceptors, decorators, observer methods and custom context objects with the container.

     void afterBeanDiscovery(@Observes AfterBeanDiscovery event, BeanManager manager) { ... }
 

If any observer method of the AfterBeanDiscovery event throws an exception, the exception is treated as a definition error by the container.

CDI Lite implementations are not required to provide support for Portable Extensions.