2 Replies Latest reply on May 12, 2003 9:49 AM by paveu

    Problem subscribing MDB to my own topic

    paveu Newbie

      Hello!

      I have created my topic, using aaa-service.xml. I have configured new user in jbossmq-state.xml and added it to publisher and subscriber roles. How to make a simple MDB to connect to my topic?
      When I use standard topic/testTopic there's no problem. But when I try to deploy my MDB configured for my topic (as in sources below), I get the error message:
      12:11:36,856 WARN [JMSContainerInvoker] JMS provider failure detected:
      javax.jms.JMSSecurityException: Connection not authorized to subscribe to destination: myTopic

      In every example I've found, one uses testTopic, guest role and user john which are from standard JBoss configuration. But no one shows how to configure everything using your own role, user and topic.

      I'm desperate. I need this information and I can't find it anywhere. Didn't ANYbody do it?

      Please help me
      Greetings
      Pawel

      SOURCES:

      aaa-service.xml:

      <?xml version="1.0" encoding="UTF-8"?>




      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
      <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager










      jbossmq-state.xml:


      <?xml version="1.0" encoding="UTF-8"?>



      john
      needle
      DurableSubscriberExample


      guest
      guest


      nobody
      nobody


      dynsub
      dynsub


      myuser
      myuser




      guest
      john


      john
      myuser


      john
      dynsub
      myuser


      john
      dynsub


      nobody






      jboss.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">



      <unauthenticated-principal>nobody</unauthenticated-principal>

      <enterprise-beans>

      <message-driven>
      <ejb-name>MyMDB</ejb-name>
      <destination-jndi-name>topic/myTopic</destination-jndi-name>
      <configuration-name>Standard Message Driven Bean</configuration-name>
      <mdb-user>myuser</mdb-user>
      <mdb-passwd>myuser</mdb-passwd>

      </message-driven>

      </enterprise-beans>

      <resource-managers>
      </resource-managers>



      ejb-jar.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

      <ejb-jar >

      <![CDATA[No Description.]]>
      <display-name>Generated by XDoclet</display-name>

      <enterprise-beans>

      <message-driven >
      <![CDATA[]]>

      <ejb-name>MyMDB</ejb-name>

      <ejb-class>pl.com.aaa.MyMDBBean</ejb-class>

      <transaction-type>Container</transaction-type>
      <message-driven-destination>
      <destination-type>javax.jms.Topic</destination-type>
      <subscription-durability>NonDurable</subscription-durability>
      </message-driven-destination>

      </message-driven>

      </enterprise-beans>

      <assembly-descriptor >
      <container-transaction>

      <ejb-name>MyMDB</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>

      </assembly-descriptor>

      </ejb-jar>