I am among those who think this "feature" of autocreated topics is somewhat ridiculous... however I am very surprised that including a depends tag didn't force your mdb to wait for the real topic. Could you file a bug about this? If you want to do some more investigating, you could look at the mdb deployment code and find out if the topic is being looked for and created if not present in the "create" step, which might have caused this problem. If this is the case and you want to fix it, trying to move the code that looks for the topic (in jndi??) to the "start" step should fix things. A patch is even better than a bug report;-)
David, your quick replies are very much appreciated!
There is actually something strange going on it seems. I stripped down my deployment descriptors to just the simple case where I have some EJBs and some MDBs that on a topic and thats it. In this case the topic is *NOT* automatically created. Good news.
If I add an MBean however that has a dependency on the topic, while at the same time the EJBs have a dependency on the MBean the topic *IS* automatically created when the MDBs are deployed.. this is despite the tag on both the MDBs AND the MBean for the topic.
I don't understand why the tag would no longer take affect for the MDBs. It may be important to note that the MDBs don't depend on the MBean, just the EJBs in the same jboss.xml, and that all of these beans are in the same jar (including the MBean). Strange.
I just took a quick look and I think this problem was fixed 2 days ago in cvs head by Scott Stark. I'd try again with the current cvs head. Alternatively there should be a release based on this within a few days.