This section describes how to configure the WSO2 Enterprise Integrator's JMS transport with SwiftMQ. Follow the instructions below to set up and configure.
.
Note |
---|
From the below configurations, do the ones in the axis2.xml file based on the profile you use as follows:
|
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 EI as described in Installation Guide.
Info |
---|
SwiftMQ should be up and running before starting WSO2 EI. |
3. Copy the following client libraries from <SMQ_HOME>/lib directory to <EI_HOME>/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 <EI_HOME>/lib and <EI_HOME>/droppins before copying the ones relevant to a given version. |
4. Next, configure transport listeners and senders in WSO2 EI.
Setting up the JMS Listener
To enable the JMS transport listener, add the following listener configuration related to SwiftMQ to <EI_HOME>/conf/axis2/axis2.xml file.
Code Block | ||
---|---|---|
| ||
<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 <EI_HOME>/conf/axis2/axis2.xml file.
Code Block | ||
---|---|---|
| ||
<!-- 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. |
...