1 Reply Latest reply: Sep 11, 2004 5:09 AM by Stephane Nicoll RSS

    1 mdb subscribed to 2 topics

    kedaar ghanekar Newbie

      Hi!

      How can I subscribe the same mdb class to two topics? Here are my working ejb-jar and jboss xmls for subscribing to 1 topic.


      -----------------------------

      <ejb-jar>
      <enterprise-beans>
      <message-driven>
      <ejb-name>LinkPublisherMDB</ejb-name>
      <ejb-class>com.crisys.sf.framework.link.LinkPublisherMDB</ejb-class>
      <message-selector></message-selector>
      <transaction-type>Container</transaction-type>
      <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
      <message-driven-destination>
      <destination-type>javax.jms.Topic</destination-type>
      <subscription-durability>Durable</subscription-durability>
      </message-driven-destination>
      <resource-ref>
      <res-ref-name>jms/TCF</res-ref-name>
      <res-type>javax.jms.TopicConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      <resource-ref>
      <res-ref-name>jmsProvider</res-ref-name>
      <res-type>org.jboss.jms.jndi.JMSProviderLoader</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      </message-driven>
      </enterprise-beans>
      </ejb-jar>

      +++++++++++++++++++

      <enterprise-beans>
      <message-driven>
      <ejb-name>LinkPublisherMDB</ejb-name>
      <configuration-name>Standard Message Driven Bean</configuration-name>
      <destination-jndi-name>topic/COM.CRISYS.SF.DTO.CALL</destination-jndi-name>
      <mdb-user>guest</mdb-user>
      <mdb-passwd>guest</mdb-passwd>
      <mdb-subscription-id>link1</mdb-subscription-id>
      <resource-ref>
      <res-ref-name>jms/TCF</res-ref-name>
      <jndi-name>UIL2ConnectionFactory</jndi-name>
      </resource-ref>
      <resource-ref>
      <res-ref-name>jmsProvider</res-ref-name>
      <jndi-name>java:/DefaultJMSProvider</jndi-name>
      </resource-ref>
      </message-driven>


      </enterprise-beans>