...
Singletons can be declared in the ejb-jar.xml as follows:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<ejb-jar> <enterprise-beans> <session> <ejb-name>MySingletonBean</ejb-name> <ejb-class>org.superbiz.MySingletonBean</ejb-class> <session-type>Singleton</session-type> <load-on-startup/> <depends-on> <ejb-name>SingletonFoo</ejb-name> <ejb-name>SingletonBar</ejb-name> </depends-on> </session> </enterprise-beans> </ejb-jar> |