This section describes how to configure WSO2 ESB to work as a JMS-to-JMS proxy service.
Diagram 3 : Simple JMS to JMS proxy service
...
Code Block |
---|
ant stockquote -Dmode=placeorder -Dtrpurl="jms:/JMStoHTTPStockQuoteProxyStockQuoteProxy?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.ContentTypeProperty=Content-Type&transport.jms.DestinationType=queue" |
Generally, JMS is used for one-way, asynchronous message exchange. However you can perform synchronous messaging also with JMS. Described below is how to configure WSO2 ESB for two-way and quad-channel synchronous messaging.
JMS Synchronous Invocations : Dual Channel HTTP-to-JMS
Diagram 4 : Dual-channel JMS synchronous invocations
The following example code shows configuration of WSO2 ESB for dual-channel JMS synchronous invocations.
Code Block | ||||
---|---|---|---|---|
| ||||
<proxy name="StockQuoteProxy" transports="http">
<target>
<endpoint>
<address uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory& java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue&transport.jms.ReplyDestination=SimpleStockQuoteServiceReply"/>
</endpoint>
<inSequence>
<property action="set" name="transport.jms.ContentTypeProperty" value="Content-Type" scope="axis2"/>
</inSequence>
<outSequence>
<property action="remove" name="TRANSPORT_HEADERS" scope="axis2"/>
<send/>
</outSequence>
<target>
<publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
</proxy> |
Child pages (Children Display)