1 Reply Latest reply on Aug 6, 2006 3:27 PM by one_special_user

    load EJB on startup?

    goonie

      Hello everyone,

      Similar to the load-on-startup of Servlets, I'd like to load some stateless session beans on JBoss startup. Is there an easy way to do this? I'd prefer a container agnostic solution, but would also be happy with a JBoss 4.0.4 specific hint.

      Regards,

      Andreas

        • 1. Re: load EJB on startup?

          Basically the Lifecycle of EJB's (Session Beans etc) is controlled thru the container, but there's no similar "startup-hook" than the one you mentioned with servlets.
          And as far as I know there's neither a J2EE-Spec nor JBoss-Deployment-Descriptor-specific solution.

          If your "startup-hook" should just configure Logging or Hibernate, try to configure standardjboss.xml and jboss-service.xml to your needs.
          Or take a look at MBeans for bootstrapping some services (JBoss-specific)