posted 12 years ago
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>>)