3 Replies Latest reply on Sep 14, 2002 11:44 PM by Adrian Brock

    EJB deployment

    Marc Sturm Newbie


      Sorry, I am just starting to read Marc's JMX book but I have actually a question about deploying regular EJBs. When I do a total redeploy or when I restart Jboss, how do I make sure the jars and therefore the beans are deployed in the right order by Jboss? For instance if a jar references another jar, this referenced jar has to be deployed first. Maybe I am also missing something. Let me know?

      Thanks for your answer, I don't know if this question is posted in the right category.


        • 1. Re: EJB deployment
          Greg Turner Apprentice

          Not sure about the answer. You did not mention the version you use and I get mixed up on differences in versions. I think things are deployed in alphabetical order so you can naming the jars as is appropriate. In later versions, I think JBoss is smart enough to read in a jar and withhold final deployment until dependent jars are loaded. Since JBoss is so easy to start and stop, just try it and see what happens and search on your jar name in log file.

          • 2. Re: EJB deployment
            Marc Sturm Newbie

            Thanks for the answer, yes I should have said that I am using JBoss3.0.0
            It looks like jboss is smart enough to load entities before sessions beans when they are in different jars, but when it is a session bean jar referencing another session bean jar It doesnt work. I have to reload them manually.


            • 3. Re: EJB deployment
              Adrian Brock Master

              It :-)

              There are a number of ways to do this.

              1) Specify a in jboss.xml
              You have to find the jmx name of the bean or
              jar package. These are in the jboss.j2ee domain
              http://localhost:8082 or http://localhost:8080/jmx-console

              2) Use the PrefixDeploymentComparator in jboss-service.xml
              I think this might be broken in 3.0.0?
              This allows you to name your beans for ordering

              3) Write an MBean to deploy your beans,
              using a JMX invocation on
              jboss.system:service=MainDeployer deploy(URL)

              There are other mechanisms.