All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download and install WSO2 ESB from http://wso2.com/products/enterprise-service-bus. For a list of prerequisites and step-by-step installation instructions, refer to Getting Started Installation Guide in the WSO2 ESB documentation. 
  2. Download and install a JMS server. We use ActiveMQ as the JMS provider in this example.  
  3. Make the following edits to the <ESB_HOME>/repository/conf/axis2/axis2.xml file.
    • To enable the JMS transport, uncomment the Axis2 transport listener configuration for ActiveMQ as follows:
      <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">... 
     
    • Set the transport.jms.SessionTransactedparameter to true. After making this update, the transportReceiversection of axis2.xml should appear as follows:

      Code Block
      languagehtml/xml
      <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
              <parameter name="myQueueConnectionFactory" locked="false">
                  <parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
                  <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
                  <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
              	<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
              	<parameter name="transport.jms.SessionTransacted">true</parameter>
              </parameter>
      
              <parameter name="default" locked="false">
                  <parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
                  <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
                  <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
                  <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
      			<parameter name="transport.jms.SessionTransacted">true</parameter>
              </parameter>
      </transportReceiver>


     
    • Uncomment the Axis2 transport sender configuration as follows:
      <transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/> 
      
  4. Copy the following ActiveMQ client JAR files to the <ESB_HOME>/repository/components/lib directory to allow the ESB to connect to the JMS provider.
    • activemq-core-5.2.0.jar
    • geronimo-j2ee-management_1.0_spec-1.0.jar
     
  5. Add a custom mediator called MessageCounterMediator. Download the MessageCounterMediator file, and save it in the <ESB_HOME>/repository/components/lib folder. To learn how to write custom mediators, refer to Writing Custom Mediator Implementations in the WSO2 ESB documentation. 
  6. Start ActiveMQ (or equivalent JMS Server) and WSO2 ESB.
  7. Start the sample Axis2 server. For instructions, refer to the section Setting Up the ESB Samples Setup - Starting Sample Back-End Servicesthe Axis2 server in the WSO2 ESB documentation.

...