Send servlet events as CDI events
Provide automatic startup capabilities for beans.
Add these qualifiers:
And require that the container fires an event with an event type of Object when a context is initialized and destroyed, giving us 8 distinct events:
The payload of the event will depend on the environment in which CDI is operating. The spec would require that if the application was a web application that the payload would be the relevant event as defined by the Servlet spec.
The @Application event would be deferred until bootstrap is complete.
Actually, the qualifier would need to look like this:
@Initialized(ApplicationScoped.class) Object object
I have updated the pull req with Jozef's suggestion.
Jozef, can you spin the idea about extending this to non-built-in scopes to a new issue please?
https://github.com/jboss/cdi/pull/49 is a pull which resolves this plus CDI-80 in a compatible fashion.
The pull request uses ConversationContext.class as a value for the @Initialized and @Destroyed qualifiers while it should use ConversationScoped.class