1 Reply Latest reply on Aug 30, 2006 2:38 PM by Alexander Sack

    Deployment order - dependencies

    Georges Berscheid Newbie


      How do I force the Deployment service to deploy a EJB JAR file before a resource adapter RAR file?

      I have a EAR file that contains a .jar file with EJB3s and a @Service MBean. The EAR file also contains a RAR file with a resource adapter that looks up that service MBean when it starts. Therefore the .jar file needs to be deployed before the .rar file which is not possible using the standard DeploymentSorter.
      So I set up jboss-service.xml to use the PrefixDeploymentSorter instead and renamed my RAR file 9_MyResourceAdapter.rar.

      However, the RAR file is still deployed before the JAR file. Could it be because the JAR file also contains the message endpoint for the incoming resource adapter?

        • 1. Re: Deployment order - dependencies
          Alexander Sack Novice

           

          "georgesberscheid" wrote:

          How do I force the Deployment service to deploy a EJB JAR file before a resource adapter RAR file?

          I have a EAR file that contains a .jar file with EJB3s and a @Service MBean. The EAR file also contains a RAR file with a resource adapter that looks up that service MBean when it starts. Therefore the .jar file needs to be deployed before the .rar file which is not possible using the standard DeploymentSorter.
          So I set up jboss-service.xml to use the PrefixDeploymentSorter instead and renamed my RAR file 9_MyResourceAdapter.rar.

          However, the RAR file is still deployed before the JAR file. Could it be because the JAR file also contains the message endpoint for the incoming resource adapter?


          There is some JMX type annotation that can provide dependencies but in general intra deployment dependencies is undefined in the spec.

          Moreover, the JBoss deployer I believe does thing by suffix alphabetical order (though I would have to recheck myself).

          You can extend the Deployment comparator to some some custom deployments as well as turning on prefix order, i.e. name your files 1-firstdeployfile, 2-secondeployfile, etc.