MDBs are listening to Hornetq after restarting from jmx-console manually

Latest response

I am working on the migration from JBoss 4.2 to Jboss 6.1. I have migrated the queues to HornetQ 2.2. The consumer count of the queue is zero but when I restart the MDB from jmx console manually I could see the consumer count increasing to 15. After restarting the MDBs are listening to local queues but not at startup.

Some articles suggested that it might be happening because of MDBs are being deployed before Queues and not able to register to the queues.
In other articles , people recommended to @Depends to make sure the MDB are being deployed after Queues are created. How can we make sure to deploy the queues in ejb 2 ?

Or is there any other way to handle this issue?

Responses