Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!