4 Replies Latest reply on Mar 17, 2003 11:53 AM by ertdredge

    EJB Deployment order

    ageejas1

      I've ran into a problem where I have one EJB call another, but their deployment order is incorrect causing an error at JBoss startup. I have bean A which needs to call bean B. In bean A's jar file, I have the jboss.xml and the ejb-jar.xml. I have the <ejb-ref> setup in the jboss.xml file and the ejb-jar.xml file, so that A can call B and it did work when I was using an earlier version of JBoss. When JBoss starts, it throws exceptions when it opens A, and then opens B successfully. I can then re-deploy A and it works fine. Currently I am running the JBoss-3.1.0Alpha version. I have done some searching and found that works on mbeans, but will that work on an session bean? Can anyone help me understand how to control the order of the deployment?

        • 1. Re: EJB Deployment order

          Yes, you can put a in jboss.xml
          You have to make it depend on something from the
          jboss.j2ee domain from http://127.0.0.1:8080/jmx-console

          Alternatively, use the PrefixDeploymentSorter in
          jboss-service.xml
          and call your beans 10.A.jar 20.B.jar to get the order
          you need.

          Regards,
          Adrian

          • 2. Re: EJB Deployment order
            ageejas1

            I would like to use the PrefixDeploymentSorter solution, however in the JBoss-3.1.0Alpha jboss-service.xml there is no line for the PrefixDeploymentSorter. After examining the JBoss-3.0.0 jboss-service.xml I see that it has the two lines:

            org.jboss.deployment.DeploymentSorter

            <!--

            org.jboss.deployment.scanner.PrefixDeploymentSorter

            -->

            So the solution looks pretty simple, however when I look at the jboss-service.xml for the 3.1.0-Alpha, I only see the line:

            org.jboss.deployment.DeploymentSorter


            I copy the PrefixDeploymentSorter line from the JBoss-3.0.0 jboss-service.xml file into the 3.1.0-Alpha jboss-service.xml file, and JBoss complains that it cannot find PrefixDeploymentSorter. I have tried looking for it, and cannot seem to locate it.

            What has changed between versions, and can I use the PrefixDeploymentSorter in the 3.1.0-Alpha version? If you know where the file is, could you let me know so I can find it? Thanks in advance.

            • 3. Re: EJB Deployment order

              Apparently not,

              I guess you got 3.1.0alpha from CVS,
              try running cvs update -dP

              3.2beta should be out soon.

              Regards,
              Adrian

              • 4. Re: EJB Deployment order
                ertdredge

                doesn't appear to be allowed by the jboss.xml DTD.