This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

This section describes how to configure the WSO2 ESB's JMS transport with SwiftMQ. Follow the instructions below to set up and configure.
 
1. Download and set up SwiftMQ. Instructions can be found in SwiftMQ documentation. 

2. If you have not already done so, download and install WSO2 ESB as described in Getting Started.

SwiftMQ should be up and running before starting the ESB.

3. Copy the following client libraries from <SMQ_HOME>/lib directory to <ESB_HOME>/repository/components/lib directory. 

  •  jms.jar
  • jndi.jar
  • swiftmq.jar

Always use the standard client libraries that come with a particular version of SwiftMQ, in order to avoid version incompatibility issues. We recommend you to remove old client libraries, if any, from all locations including <ESB_HOME>/repository/components/lib and <ESB_HOME>/repository/components/droppings before copying the ones relevant to a given version.

4. Next, configure transport listeners and senders in ESB.

Setting up the JMS Listener

To enable the JMS transport listener, add the following listener configuration related to SwiftMQ to <ESB_HOME>/repository/conf/axis2/axis2.xml file.

<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
   <parameter name="myTopicConnectionFactory" locked="false">
       <parameter name="java.naming.factory.initial" locked="false">com.swiftmq.jndi.InitialContextFactoryImpl</parameter>
       <parameter name="java.naming.provider.url" locked="false">smqp://localhost:4001/timeout=10000</parameter>
       <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
       <parameter name="transport.jms.JMSSpecVersion" locked="false">1.0</parameter>
       <parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
   </parameter>
   <parameter name="myQueueConnectionFactory" locked="false">
       <parameter name="java.naming.factory.initial" locked="false">com.swiftmq.jndi.InitialContextFactoryImpl</parameter>
       <parameter name="java.naming.provider.url" locked="false">smqp://localhost:4001/timeout=10000</parameter>
       <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
       <parameter name="transport.jms.JMSSpecVersion" locked="false">1.0</parameter>
       <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
   </parameter>
   <parameter name="default" locked="false">
       <parameter name="java.naming.factory.initial" locked="false">com.swiftmq.jndi.InitialContextFactoryImpl</parameter>
       <parameter name="java.naming.provider.url" locked="false">smqp://localhost:4001/timeout=10000</parameter>
       <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
       <parameter name="transport.jms.JMSSpecVersion" locked="false">1.0</parameter>
       <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
   </parameter>
</transportReceiver>

Setting up the JMS Sender

To enable the JMS transport sender, add the following configuration in <ESB_HOME>/repository/conf/axis2/axis2.xml file. 

<!-- uncomment this and configure to use connection pools for sending messages -->
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
For details on the JMS configuration parameters used in the code segments above, see JMS Connection Factory Parameters.

 

You now have instances of SwiftMQ and WSO2 ESB configured, up and running. Next, refer to section JMS Usecases for implementation details of various JMS use cases.

  • No labels