...
- If you have not already done so, see Installing the Product for details on installing WSO2 EI.
- Open a command line terminal and start the broker profile that is shipped with your WSO2 EI distribution by running one of the following startup scripts from the
<EI_HOME>/wso2/broker/bin
directory:On Linux/Mac OS: sh wso2server.sh On Windows: wso2server.bat --run
Configure the JMS inbound listener. Following is a sample JMS inbound listener configuration:
Code Block language html/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/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>
Info For more information on the JMS configuration parameters used in the code segments above, see JMS Connection Factory Parameters.
- Open
<EI_HOME>/conf/jndi.properties
file and make a reference to the running EI-Broker runtime as specified below:Use carbon as the virtual host.
- Define a queue named
JMSMS
. Comment out the topic, since it is not required in this scenario. However, in order to avoid getting the
javax.naming.NameNotFoundException:TopicConnectionFactory
exception during server startup, make a reference to the Broker profile from theTopicConnectionFactory
as well.
For example:Anchor jndi jndi Code Block # register some connection factories # connectionfactory.[jndiname] = [ConnectionURL] connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5675' connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5675' # register some queues in JNDI using the form # queue.[jndiName] = [physicalName] queue.JMSMS=JMSMS queue.StockQuotesQueue = StockQuotesQueue
- Ensure that Broker profile is running, and then open a command prompt (or a shell in Linux) and go to the
<EI_HOME>/bin
directory. - Start the Integration ESB runtime server by executing
sh integrator.sh -Dqpid.dest_syntax=BURL
(on Linux/OS X) or
integrator.bat -Dqpid.dest_syntax=BURL
(on Windows).
...