This documentation is for WSO2 Enterprise Service Bus version 4.9.0 . View documentation for the latest release.

All docs This doc
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 Next »

Introduction

The following diagram depicts quad-channel JMS synchronous invocations of the WSO2 Enterprise Integrator (WSO2 EI).

   

Prerequisites

Follow the steps below to set the prerequisites up before you start.

  1. Download and set up Apache ActiveMQ. For instructions, see Installation Prerequisites. 
  2. Copy the following client libraries from the  <AMQ_HOME>/lib directory to the < EI_HOME>/lib directory.  
    ActiveMQ 5.8.0 and above   
      • activemq-broker-5.8.0.jar
      • activemq-client-5.8.0.jar
      • geronimo-jms_1.1_spec-1.1.1.jar
      • geronimo-j2ee-management_1.1_spec-1.0.1.jar
      • hawtbuf-1.9.jar   

              Earlier version of ActiveMQ

      • activemq-core-5.5.1.jar

      • geronimo-j2ee-management_1.0_spec-1.0.jar

      • geronimo-jms_1.1_spec-1.1.1.jar

Sample configuration

Following is a sample configuration of WSO2 EI for quad-channel  JMS synchronous invocations.

Example Code 5
<proxy name="QuadJMS" transports="jms" xmlns="http://ws.apache.org/ns/synapse">
      <target>
          <inSequence>
              <property action="set" name="transport.jms.ContentTypeProperty" value="Content-Type" scope="axis2"/>
              <log level="full" xmlns="http://ws.apache.org/ns/synapse"/>
              <send>
                  <endpoint>
                      <address uri="jms:/BEReq?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=queue&amp;transport.jms.ReplyDestination=BERes"/>
                  </endpoint>
              </send>
          </inSequence>
          <outSequence>
              <send/>
          </outSequence>
      </target>
      <parameter name="transport.jms.ContentType">
          <rules>
              <jmsProperty>contentType</jmsProperty>
              <default>text/xml</default>
          </rules>
      </parameter>
      <parameter name="transport.jms.Destination">ClientReq</parameter>
</proxy>

The message flow of the above sample configuration is as follows:

  1. The JMSReplyTo property of the JMS message is set to ClientRes. Therefore, the client sends a JMS message to the ClientReq queue.
  2. The transport.jms.ReplyDestination value is set to BERes. This enables the WSO2 EI proxy to pick messages from ClientReq queue, and send to BEReq queue.
  3. The back-end picks messages from the BEReq queue, processes and places response messages to BERes queue.
  4. Once a response is available in BERes queue, the proxy service picks it and sends back to ClientRes queue.
  5. The client picks it as the response message.
  • No labels