Recently my project has switched over from using JBossMQ to JBoss Messaging, and I'm having difficulty programatically assigning dependencies on JBoss Messaging Queues and Topics.
Previously with JBossMQ, we just added the @Depends annotation and specified the Queue or Topic Object Name, but that doesn't seem to be working.
For example with JBossMQ we used:
So going off the names shown for this Topic using JBoss Messaging as shown in the JMX Console, the new object name should make the Depends code look like:
I can see that this object exists in the JMX Console, but on startup the code with this as a dependency says it's still waiting for it to start up.
The Topic that we're publishing to is created on startup by the MDB that listens on it. I have used the object name of that MDB as the dependency instead of using the Topic name, like so:
That made it work correctly, but due to the nature of our project, the names of the MDBs that listen on this Topic will be changing frequently, so I don't want to use this method as it will couple the sender with the receiver, which just seems like bad programming practice.
I would think there has to be a way to do this the same way that we did it with JBossMQ, but I'm running out of ideas.
Any help would be greatly appreciated.