1 Reply Latest reply on May 2, 2006 10:50 PM by Steven Nelson

    Cannot subscribe an MDB to a topic or queue

    Steven Nelson Newbie

      Hello everyone.

      I have been searching for this solution for days and I cannot seem to find the right answer. I have tried to confugure my MDB to listen on a topic or queue that I have setup in jboss and it just seems to iqnore the configuration in the jboss.xml file, here is the jboss.xml



      <message-driven >
      <![CDATA[Description for MessageBean]]>





      I have setup the topic like this in the in a seperate file "formmq-service.xml" I put into the
      C:\jboss-4.0.3SP1\server\default\deploy\jms directory

      <mbean code=org.jboss.mq.server.jmx.Topic name=jboss.mq.destination:service=Topic,name=ForumTopic>
      <depends optional-attribute name=DestinationManager>jboss.mq:service=DestinationManager
      <depends optional-attribute-name=SecurityManager>jboss.mq:service=SecurityManager
      <attribute name=SecurityConf>

      <role name=guest read=true write=true/>
      <role name=publisher read=true write=true create=true/>
      <role name=durpublisher read=true write=true create=true/>

      There is an ending "depends" at the end of the lines above, it is not showing in this WSYWIG

      If I use the MDB name "MessageBean" when I publish the message everything works because jboss creates a topic with the name of the bean, which is ok but the reason I need a topic is because I need multiple subscriptions.
      I was also having a problem deploying the EJB with a durable subscription, every time I try deploy with the below config line in the message-driven-destination tag


      I get an error at startup "cannot subscribe to null topic"