• 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

JMS Q in clustered environment

 
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to integrate JMS Q in cluster aware environment? I am using WAS 7 servers in cluster mode.
I am using Spring Framework.

I am envisioning as follows
1. I do have 2 WAS servers with each having JMS engine configured.
2. There will be a distributed queue connected to both of the JMS engines.

Has above understanding is correct?
 
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Configuring JMS in WebSphere 6.1.x or 7.x is very similar. It is a long list of never ending tasks. But you can always script it in Jython and then you dont have to bother about it.

I am using JMS in clustered mode in WebSphere 7 and I configured it as follows. Initially I did manual configuration and later on scripted the whole thing in Jython. You may already be knowing most of this but I thought I will compile it for the completeness.

1. Create Service Integration Bus (SIB)
2. Add App Cluster as the Bus Member, which will also create first messaging engine
3. Add second messaging engine as you have two app servers in app cluster
4. You specify the file store for both the messaging engines.
5. Create JMS Connection Factory and associate it with the SIB.
6. Create SIB Destination (SIB Topic or SIB Queue)
7. Create JMS Destination, which is either Queue or TopicSpace
8. Create JMS Activation Specification that connects the SIB Destination to JMS Destination
9. Setup CoreGroup policy so that messaging engines are dedicated to application servers of the cluster. So each app server in the cluster will handle one messaging engine.
10. Now write Message Driven Beans (MDB) and implement the desired functionality
11. Create ibm-ejb-jar-bnd.xml file with one entry for every MDB.
<message-driven name="TransactionListenerMDB">
<jca-adapter activation-spec-binding-name="<<Topic or Queue ACTI SPEC JNDI GOES HERE>>"
destination-binding-name="<<JMS Topic or Queue JNDI GOES HERE>>" />
</message-driven>
12. Specify the EJB3 annotations on top of the MDB file as follows:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "<<JMS Topic or Queue JNDI GOES HERE>>") }, messageListenerInterface = javax.jms.MessageListener.class)
@TransactionAttribute(<<Transaction Attribute GOES HERE>>)
 
Jignesh Patel
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Deepak,

Did you ever have an experience of creating Topic On the Fly. I have a requirement where I need to create a subscriber until message comes back through JMS queue and then publisher publish it to topic and then subscriber takes appropriate action.
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No I have never done such implementation.
reply
    Bookmark Topic Watch Topic
  • New Topic