Using CDI is there a way to cause a bean to be instantiated when the application server starts up?
I would like to be able to do something like:-
@Singleton
@Startup
public class StartupBean {
...
}
Unfortunately, although the @Singleton
annotation exists in the javax.inject.*
package the @Startup
annotation doesn't.