I'm not sure whether or not my deployment packages are set up the way they should be. Essentially I have a project.jar file which contains one MDB set up to listen to specific topic. I also have a service instrumented as an MBean that listens to a socket and pushes messages to that topic. It's packaged in a project-services.sar file.
My problems all surround the .sar file's apparent attempt to create a Topic that is already created or in use. If I deploy project.jar first, no topic is found and a default one with the name the MDB asked for is created. Afterward, the .sar file fails to create the topic. How do I stop this? I don't want the Topic created until my .sar file is deployed.
Also, once both files are deployed and working (achieved by deploying the .sar file first, then the .jar), an attempt at hot-deploying the .sar file or the .jar file fails a pretty miserable death. The fun seems to surround a few JMSExceptions complaining that the destination has already been added to the server and in use.
Can anyone point me in the right direction? Are there any docs (free or for sale) that will give me a clue? The docs I have don't cover .sar files or JMX deployment of JMS Topics very well at all.
In jboss.xml for the mdb add
The MDB won't start until after the MBean and it will
be stopped before the MBean. Should solve both problems.