• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Associate Same Mdb file to multiple queue in Ejb3 jboss 5.x server

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Above code is my message driven bean and working fine for single queue 'Queue1'. Now i want to associate Queue2 to same mdb.
I can do the same thing by creating another mdb class "EJB3MessageDrivenBean2" and by just changing activationConfig property as follow.


but in this method i have to replicate my code and in future if i have to associate another queue Queue3 then i have to again replicate java file.

Any other method by changing in xml file or any other method.
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why have different queues if one MDB is going to process them?
Have the MDB listen to only one queue and maybe look at using your JMS provider settings to automatically route messages to the queue being listened to if you have to have multiple queues.
 
chandr prakash
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lets say message in queue1 are JmsMsg11,JmsMsg12,JmsMsg13,JmsMsg14
Lets say message in queue2 are JmsMsg21,JmsMsg22,JmsMsg23,JmsMsg24

I have to process JmsMsg11 and JmsMsg21 simultaneously. After processing of JmsMsg11, i have to process JmsMsg12 then JmsMsg13 then JmsMsg14. Same is also applicable for queue2.

I have done same thing in weblogic 10.x by some change in ejb-jar.xml and weblogic-ejb-jar.xml by following code. dont know how to do in jboss 5.x.
ejb-jar.xml



weblogic-ejb-jar.xml


 
chandr prakash
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Waiting for reply!
 
chandr prakash
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am i clear? Please reply......
 
reply
    Bookmark Topic Watch Topic
  • New Topic