2 Replies Latest reply on Sep 12, 2005 1:24 AM by vlokesh

    How to deploy a sar after a jar?

      I'm developing a system which has a Jboss service (SAR) executing since startup. It has some dependencies on a EJB module (JAR). Each one, the SAR and JAR file, are included within an EAR file. I've configured the EAR by setting up the files application.xml and jboss-app.xml. The last one to deploy the service file.

      How can I deploy the SAR file after the JAR file? Jboss seems to process the jboss-app.xml file before the application.xml file so a ClassNotFoundException is always thrown.

      Thanks,

      nikodc

        • 1. Re: How to deploy a sar after a jar?

          You need to tell the SAR that it depends on JAR File by editing its jboss-service.xml file.

          Take a look at the following example for your reference.


          jboss:j2ee:service=EJB,jndiName=jName


          you should replace the jnName in the above example with the jndiName on which your SAR is depended. If SAR is dependent on multiple files then you can use <depends-list> tag as follows.


          <depends-list>
          <depends-list-element>jboss:j2ee:service=EJB,jndiName=jName1
          <depends-list-element>jboss:j2ee:service=EJB,jndiName=jName2
          </depends-list>


          Regards.

          Lokesh.

          • 2. Re: How to deploy a sar after a jar?

            You need to tell the SAR that it depends on JAR File by editing its jboss-service.xml file.

            Take a look at the following example for your reference.

            < mbean code="xxx" name="yyy" >
            < depends >jboss:j2ee:service=EJB,jndiName=jName< /depends >
            < mbean >

            you should replace the jnName in the above example with the jndiName on which your SAR is depended. If SAR is dependent on multiple files then you can use <depends-list> tag as follows.

            < mbean code="xxx" name="yyy" >
            <depends-list>
            <depends-list-element>jboss:j2ee:service=EJB,jndiName=jName1
            <depends-list-element>jboss:j2ee:service=EJB,jndiName=jName2
            </depends-list>
            < /mbean >

            Regards.

            Lokesh.