aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes MDB Listening to Multiple Queues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "MDB Listening to Multiple Queues" Watch "MDB Listening to Multiple Queues" New topic
Author

MDB Listening to Multiple Queues

Hemanth H Bhat
Greenhorn

Joined: Apr 14, 2008
Posts: 15
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

Joined: Apr 14, 2008
Posts: 15
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MDB Listening to Multiple Queues