0 Replies Latest reply on Mar 5, 2007 6:18 AM by Jochen Boehringer

    Deployment order of web and ejb modules in same ear file

    Jochen Boehringer Newbie


      we are developing an enterprise application containing two web and 3 ejb modules on Jboss 5. Now we want to do some initialization work when the application starts.

      Our idea was to develop a servlet which has set its <load-on-startup>0</load-on-startup> parameter in the web.xml set to 0.

      In the init Method of the servlet we are executing our initialization code. The problem is that we want to access the database via entity beans from the ejb modules in the initialization code.

      But jboss first deploys the web modules and then the ejb modules in the ear. So at execution time of the init Method of our servlet the ejbs are not visible yet and we are getting exceptions. Is there a possibility to force Jboss to first load the ejb modules and then the web modules inside the ear?

      I have seen the depends tag in the jboss-web.xml but I don't know how to get the JMX name for the ejb module.

      Any help would be greatly appreciated.

      Best regards,