3 Replies Latest reply on Jan 22, 2010 4:08 AM by luv zorabian

    JBoss 5.1.0 Deployment Problem

    Justin G Newbie



      I'm trying to migrate a web application from JBoss 4.2.2 to 5.1.0, but I'm hung up on a deployment dependency issue.  My ear contains 3 modules; myGui.war, myServer.jar, and config-service.xml.  The config-service module contains mbean declarations for creating JMS queues and loading a java properties file, so it needs to be deployed first.  How can I achieve this, as it is currently being deployed last (it deployed fine in jboss 4.2.2).


      My application.xml looks similar to this:

      <?xml version="1.0" encoding="UTF-8"?>
      <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
          id="Application_ID" version="5">


      My jboss-app.xml looks similar to this:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD Java EE Application 5.0//EN"
              <loader-repository-config> java2ParentDelegation=false 





        • 1. Re: JBoss 5.1.0 Deployment Problem
          Gilles Dupont Tagne Tagne Newbie

          Hi Justin,


          if you have MessageDrivenBean in your myServer.jar you could do this.


          For example your have this in your config-service.xml


          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_5_0.dtd" >
               <mbean code="org.jboss.jms.server.destination.QueueService" name="org.jboss.jms:service=Queue,name=myQueue"
                    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>


          you have to put this annotations on your MDBean class @org.jboss.ejb3.annotation.Depends


          public class MDBean implements MessageListener {


          the MDBean will be deploy after the queue/myQueue

          • 2. Re: JBoss 5.1.0 Deployment Problem
            Justin G Newbie

            Thanks for the reply!  Does your solution imply that there is no way to force config-service.xml to be deployed first?  Much of the code also depends on properties that don't get loaded until config-service.xml is deployed, so my preferred solution is to modify the deployment order.






            EDIT: Worst case, I know I can just throw config-service.xml into the deploy directory, but I was hoping to deploy it in the ear.


            ANOTHER EDIT: I ended up sprinkling @Depends annotations around for the queues and properties.  Thanks again for the reply.

            • 3. Re: JBoss 5.1.0 Deployment Problem
              luv zorabian Newbie

              I guess you can set some order for the deployment using URL Comparator.

              But pls check suitable name in your version.


              Like in jboss4 its,



              in AS-5 its .



              may this could help you some way.