Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MDB Listening to Multiple Queues

 
Hemanth H Bhat
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a single MDB and i want it to listen to more than one queues say q1 and q2 I need to know what changes do i need to make in deployment descriptor to accomplish the same
Kindly note that i am using Weblogic 8.1 SP 4
would appreciate your early responses on this..


Thanks
Hemanth
 
Hemanth H Bhat
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only option here would be to declare the same MDB as multiple MDB's in the deployment descriptor
For example
i.e



<message-driven>
<ejb-name>DMProcessorMDB1</ejb-name>
<ejb-class>com.bt.dm.ejb.DMProcessorMDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
<subscription-durability>NonDurable</subscription-durability>
</message-driven-destination>
<resource-ref>
<res-ref-name>jdbc/DSRef</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>

<message-driven>
<ejb-name>DMProcessorMDB2</ejb-name>
<ejb-class>com.bt.dm.ejb.DMProcessorMDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
<subscription-durability>NonDurable</subscription-durability>
</message-driven-destination>
<resource-ref>
<res-ref-name>jdbc/DSRef</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>


where DMProcessorMDB1 and DMProcessorMDB2 are the pointing to the same MDB Class
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic