Versions Compared

Key

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

...

  1. Copy the following JAR files from the <MB_HOME>/clent-lib folder to the <ESB_HOME>/repository/components/lib folder.
    • andes-client-3.0.1.jar
    • geronimo-jms_1.1_spec-1.1.0.wso2v1.jar
    • org.wso2.securevault-1.0.0-wso2v2.jar
  2. Open the <ESB_HOME>/repository/conf/jndi.properties file and create the connection from the ESB to the WSO2 MB runtime as shown below: 

    Code Block
    # register some connection factories
    # connectionfactory.[jndiname] = [ConnectionURL]
    connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5673'
    connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5673'
    # register some queues in JNDI using the form
    # queue.[jndiName] = [physicalName]
    queue.JMSMS=JMSMS
    queue.StockQuotesQueue = StockQuotesQueue

    Note the following in the above configuration:

    • The virtual host is carbon.

    • The ESB is connecting to a queue named JMSMS.
    • The topic is commented out since it is not required in this scenario. However, in order to avoid getting the javax.naming.NameNotFoundException:TopicConnectionFactory exception during server startup, we will maintain the TopicConnectionFactory as well. 

You can now start the WSO2 ESB server and configure the JMS inbound endpoint.

...

  1. Ensure that WSO2 MB is still running.
  2. Open a command line terminal (or a shell in Linux) and navigate to the <ESB_HOME>/bin directory.
  3. Execute one of the following commands to start the ESB:
    • On Linux/Mac OS:  sh wso2server.sh
    • On Windows:  wso2server.bat

  4. Open the management console of the ESB (from https://10.100.5.12:9443/carbon) and click Inbound Endpoints (in the Main menu) to start creating the endpoint. Listed below are the values you need to provide:
    • Endpoint Name: jms_inbound

    • Type: jms

    • Sequence: request

    • Error Sequence: fault

    • Suspend: false

    • interval: 1000

    • sequential: true

    • coordination: true

    • java.naming.factory.initial: org.wso2.andes.jndi.PropertiesFileInitialContextFactory

    • java.naming.provider.url: repository/conf/jndi.properties

    • transport.jms.ConnectionFactoryJNDIName: QueueConnectionFactory

    • transport.jms.ConnectionFactoryType: queue

    • transport.jms.Destination: JMSMS

    • transport.jms.SessionTransacted: false

    • transport.jms.SessionAcknowledgement: AUTO_ACKNOWLEDGE

    • transport.jms.CacheLevel: 1

    Info

    For more information on the JMS configuration parameters used in the code segments given above, see JMS Connection Factory Parameters.

  5. Click Save once you have entered all the values as shown below.

    Following is a sample JMS inbound listener configuration:

    Expand
    titleSample JMS Inbound Endpoint
    Code Block
    languagehtml/xml
    <inboundEndpoint xmlns="http://ws.apache.org/ns/synapse"
                     name="jms_inbound"
                     sequence="request"
                     onError="fault"
                     protocol="jms"
                     suspend="false">
       <parameters>
          <parameter name="interval">1000</parameter>
          <parameter name="sequential">true</parameter>
          <parameter name="coordination">true</parameter>
          <parameter name="java.naming.factory.initial">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
          <parameter name="java.naming.provider.url">conf>repository/conf/jndi.properties</parameter>
          <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
          <parameter name="transport.jms.ConnectionFactoryType">queue</parameter>
          <parameter name="transport.jms.Destination">JMSMS</parameter>
          <parameter name="transport.jms.SessionTransacted">false</parameter>
          <parameter name="transport.jms.SessionAcknowledgement">AUTO_ACKNOWLEDGE</parameter>
          <parameter name="transport.jms.CacheLevel">1</parameter>
          <parameter name="transport.jms.SubscriptionDurable">false</parameter>
          <parameter name="transport.jms.SharedSubscription">false</parameter>
       </parameters>
    </inboundEndpoint>

...