4 Replies Latest reply on Jun 22, 2011 8:13 PM by david_b

    MDB deployment failure - unable to connect destination

    david_b Newbie

      Hi all,

       

      I have an interesting problem that is causing MDB deployments to fail on JBoss AS 6.0.0.Final.

       

      My application utilises a number of MDBs which listen on queues defined in deploy/hornetq/*.xml. If I start the AS, then drop the .ear files in the deploy directory everything is happy. If I start the AS with the .ear files already deployed I see these following HornetQActivation errors...

       

      INFO  [HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec
      ERROR [HornetQActivation] Unable to reconnect org.hornetq.ra.inflow.HornetQActivationSpec
      

       

      These errors repeat 10 or so times for each queue but never successfully connect. The end result is deployed MDBs that never handle messages delivered to their queues.

       

      I suspect this is a deployment order issue similar to what was discussed in this thread: http://community.jboss.org/thread/152067.

       

      It looks like the MDBs are being deployed and the reconnection attempts failing before HornetQ has created the destinations. The problem was introduced when we added two .wars to the application that increased the deployment time significantly. It also only occurs on slower machines.

       

      I've tried adding a dependency on the queues to the MDBs as was suggested here: http://community.jboss.org/message/563234#563234. Unfortunately that hasn't changed the behaviour. The dependency annotation was as follows:

       

      @org.jboss.ejb3.annotation.Depends("org.hornetq:module=JMS,name=\"queueName\",type=Queue")

       

      Does anyone have suggestions on how I could fix this? Is there a way to control deployment order to ensure HornetQ starts first? I'm fast running out of ideas

       

      Thanks

      David