[jboss-user] [Installation, Configuration & Deployment] - how to start heavy initialization tasks during container sta

mailinator do-not-reply at jboss.com
Wed Nov 29 18:17:22 EST 2006


Hello,

I have a non-EJB helper class that takes about 5-10 seconds to initialize and then lives until the container is shut down. It is only used from within EJB and is thus packaged in the ejb .jar.

Basically there are two questions:
1) is there a preferred way to model a Singleton object (exists only once per ejb .jar), which lives for the complete duration from container startup til shutdown?
2) My current approach is to create a POJO Singelton, and do all initialization in the constructor. How can I tell the container to load it on startup?

Best regards,
M.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989863#3989863

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989863



More information about the jboss-user mailing list