Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

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.

Info

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
Info

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.

Code Block
languagehtml/xml
<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. 

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

...