Java Reference
In-Depth Information
Listing 3.3. Singleton session bean example
The @Singleton annotation marks this POJO as being a singleton bean . It imple-
ments the FeaturedItem business interface. The @Startup annotation informs the
container that the bean should be eagerly created on startup . But although the bean
should be eagerly created, it shouldn't be instantiated until the SystemInitializer
singleton bean has been created . Once the SystemInitializer is created, then
DefaultFeaturedItem is instantiated, resource injection is performed, and the init
method is called per the @PostConstruct annotation
. An EJB timer is created and
 
Search WWH ::




Custom Search