3 Replies Latest reply on Jul 30, 2002 11:33 PM by David Jencks

    MDB and Topic dependencies

    mary Newbie

      I noticed that when my MDBs are deployed on startup a topic for them is automatically created if its not there yet. I want to prevent this from happening so that I can always ensure the correct security is setup on the topic.
      Adding a <depends> tag for the MDB on my topic Mbeans doesn't help (its still automatically created).

      Is there another way to setup a topic dependency on MDBs?

      I can get around it by putting the Topic MBeans deployment descriptors in a file that just happens to get called before the ejbs are deployed, but I'd like to have more explicit control.

      Thanks in advance

        • 1. Re: MDB and Topic dependencies
          David Jencks Master

          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;-)

          • 2. Re: MDB and Topic dependencies
            mary Newbie

            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.

            • 3. Re: MDB and Topic dependencies
              David Jencks Master

              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.