1 Reply Latest reply on Nov 30, 2006 9:32 AM by jBossTester jBossTester

    how to start heavy initialization tasks during container sta

    mailinator Novice


      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,