Contexts and Dependency Injection (CDI): Eager Extensions

CDI does not provide eager extensions out of the box. Even though there is @ApplicationScoped, which is intended to work in a similar way to eager instantiation, it does not behave in the specified fashion. 

I am going to describe how to use CDI extensions to get eagerly instantiated beans following the CDI lifecycle — inside the container. I have used this in Wildfly 8.0.