Integrating  Active MQ with Websphere Application Server using 
Generic RA for JMS
Author : Vinod Jessani



Part 1 --- Prepare the RAR

Add the activemq jar files to the root of genericjmsra.rar file.

activemq-optional-3.2.1.jar
derby-10.0.2.1.jar
activecluster-1.1-SNAPSHOT.jar
activemq-ra-3.2.1.jar
activeio-1.1.jar
commons-logging-1.0.3.jar
spring-1.2.2.jar
activemq-core-3.2.1.jar
concurrent-1.3.4.jar
xstream-1.1.2.jar

NOTE: Instead of adding these jars to the RAR file, you should also be able to add these jars to the classpath of the resource adapter in the next step.


Part 2 --- Install the RAR
  1. Log into WebSphere's admin-console and on the left hand side tree navigate to Resources->Resource Adapters.
  2. On the resource adapter page, click the "Install RAR" button.
  3. On the next page, browse to and select the genericjmsra.rar file.
  4. On the next page, press Ok and that will install the genericjms resource adapter.
Part 3 --- Set up the properties for the RAR so that it works with ActiveMQ
  1. Go back to the Resource Adapters page (i.e., Resources->Resource Adapter) and click on " Generic J2EE Resource Adapter for JMS".
    (NOTE: if you didn't add the activemq jars to the genericjmsra.rar file, you could add them to the classpath on this page).
  2. On this configuration page, click on the "custom properties" link to set up the adapter's properties as follows:
        
XAConnectionFactoryClassName org.activemq.ActiveMQXAConnectionFactory XAQueueConnectionFactoryClassName org.activemq.ActiveMQXAConnectionFactory XATopicConnectionFactoryClassName org.activemq.ActiveMQXAConnectionFactory connectionFactoryClassName org.activemq.ActiveMQConnectionFactory connectionFactoryProperties brokerURL=tcp://localhost:61616 providerIntegrationMode javabean queueClassName org.activemq.message.ActiveMQQueue queueConnectionFactoryClassName org.activemq.ActiveMQConnectionFactory supportsXA true topicClassName org.activemq.message.ActiveMQTopic topicConnectionFactoryClassName org.activemq.ActiveMQConnectionFactory (Note: you'll need to click on each of the properties and on the next page set the value and click ok) And that's it. Part 4 --- Configure J2C Actication Specifications
  1. Go back to the "Generic J2EE Resource Adapter for JMS" page and click on the "J2C Activation Specification" link.
  2. Click on the New button to add a new ActivationSpec.
  3. On the next page, set the following properties
                
Name: HelloAS JNDI Name: jms/HelloAS Connection Factory Interface javax.jms.QueueConnectionFactory
  1. Click OK to add the HelloAS activation spec.
  2. Go back to the main Activation Spec page and click on HelloAS to get back to its configuration page.
  3. On its config page, click on "J2C activation specification custom properties" to configure information for this activationspec.
  4. On the Custom Properties page, set the following properties:
                
destinationProperties Name=HelloQ destinationType javax.jms.Queue supportsXA true Repeat the above for each of the activationspecs. Part 5 --- Configure J2C administered objects
  1. Go back to the "Generic J2EE Resource Adapter for JMS" page and click on the "J2C administered objects" link.
  2. Click on the New button to add a new administered object
  3. On the next page, set the following properties
                
Name: HelloQ JNDI Name: jms/HelloQ Administered Object Class com.sun.genericra.outbound.QueueProxy (select from drop-down list)
  1. Click OK to add the HelloQ queue.
  2. Go back to the main Administered Object page and click on HelloQ to get back to its configuration page.
  3. On its config page, click on "J2C administered object custom properties" to configure information for this queue
  4. On the Custom Properties page, set the following properties:
                
DestinationProperties Name=HelloQ supportsXA true Repeat the above for each of the administered objects that you want to create. Part 6 --- Configure J2c Connection factories
  1. Go back to the "Generic J2EE Resource Adapter for JMS" page and click on the J2C Connection factories" link.
  2. Click on the New button to add a new connection factory
  3. On the next page, set the following properties
                
Name: HelloCF JNDI Name: jms/HelloCF Administered Object Class javax.jms.QueueConnectionFactory
  1. Click OK to add the HelloCF connection factory.
  2. Go back to the main Administered Object page and click on HelloCF to get back to its configuration page.
  3. On its config page, click on "custom properties" to configure information for this connection factory
  4. On the Custom Properties page, set the following properties: (NOTE: none required)
Repeat the above for each of the connection factories that you want to create.

Finally make sure to save the configuration and restart the appserver.
Terms of Use; Privacy Policy; Copyright ©2013-2016 (revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close