• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MDB Topic

 
Fernanda Silveira
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I have a MDB that listens to a topic. Now I want two MDB to read the same topic. What do I need to add in my ejb-jar.xml? Can I put both in the same xml file? Or in different jar files?


Here is my 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>
<display-name>Ejb1</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>MessageTopico</ejb-name>
<ejb-class>com.floripajug.scbcd.MessageBeanTopic</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
</ejb-jar>

Thanks,
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All your bean types are declared in the same ejb-jar.xml file. It is only at deployment time that the two MDB types are bound to a specific Topic configured as a resource in the EJB server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic