Integration with JEE :: CDI Eager Extension

 

Application-scoped bean to instantiate at application startup.

 

CDI does not provide eager extensions out of the box. Fortunately, you can get it working without much trouble.

1. Write the @Eager annotation:

 

2. Develop the Eager Extension to parse the annotations:

 

3. Configure the extension using this single line of code, placed inside:
META-INF/services/javax.enterprise.inject.spi.Extension

 

jBPM realization:
@BootOnLoad
– see examples

 

Leave a Reply