0 Replies Latest reply on Apr 3, 2012 11:32 AM by cbertoldi

    Dependency on a JMS destination

    cbertoldi

      Hello,  I'm developing an MDB on both JBoss AS5 and EAP 5.1. On AS5 everything is ok, JBoss always deploys HornetQ first, so the MDB starts correctly. On EAP instead, the application containing the MDB, is deployed first. So by reading this http://stackoverflow.com/questions/6774292/annotate-statelessbean-with-depends-to-hornetq-jms-queue I've added this to my jboss-web.xml: 

       

       

       

       

      {code:xml}

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-web>

          <depends>org.hornetq:module=JMS,name="pushQueue",type=Queue</depends>

          <depends>org.hornetq:module=JMS,name="pullQueue",type=Queue</depends>

          <depends>org.hornetq:module=JMS,name="NettyConnectionFactory",type=ConnectionFactory</depends>

          <depends>org.hornetq:module=JMS,name="InVMConnectionFactory",type=ConnectionFactory</depends>

          <depends>org.hornetq:module=JMS,name="NettyThroughputConnectionFactory",type=ConnectionFactory</depends>

      </jboss-web>

      {code}

       

       

      Now the application is correctly loaded after queue deployment, but with the same configuration, in AS5 it won't start. Reading Clebert's answer, I understand that this is the expected behaviour, since AS5 comes without the deployers installed.  Is there anything I can do, apart removing the jboss-web.xml when on AS5, to have the same application working in these two different environment? 

       

       

      BTW this is the error I get in AS5: 

       

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment "jboss.web.deployment:war=/gestorepmu" is missing the following dependencies:

          Dependency "org.hornetq:module=JMS,name="pushQueue",type=Queue" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'org.hornetq:module=JMS,name="pushQueue",type=Queue' **")

       

      DEPLOYMENTS IN ERROR:

        Deployment "org.hornetq:module=JMS,name="pushQueue",type=Queue" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.hornetq:module=JMS,name="pushQueue",type=Queue' **

       

          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)

          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)

          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)

          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)

          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:680)

       

      Thanks,  Carlo