Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  1. Open the <ESB_HOME>/repository/conf/JNDI.properties file and specify the JNDI designation of the topic (in this example, SimpleStockQuoteService). For example:

    Code Block
    # register some queues in JNDI using the form
    # queue.[jndiName] = [physicalName]
    queue.MyQueue = example.MyQueue
     
    # register some topics in JNDI using the form
    # topic.[jndiName] = [physicalName]
    topic.MyTopic = example.MyTopic
    topic.SimpleStockQuoteService = SimpleStockQuoteService
  2. Next, add a proxy service named StockQuoteProxy and configure it to publish to the topic SimpleStockQuoteService. You can add the proxy service to the ESB using the management console, either by building the proxy service in the design view or by copying the XML configuration into the source view. Alternatively, you can add an XML file named StockQuoteProxy.xml to <ESB_HOME>/repository/deployment/server/synapse-configs/default/proxy-services. A sample XML code segment that defines the proxy service is given below. Notice that the address URI specifies properties for configuring the JMS transport.

    Code Block
    languagehtml/xml
    <definitions xmlns="http://ws.apache.org/ns/synapse">
       <proxy name="StockQuoteProxy"
              transports="http"
              startOnLoad="true"
              trace="disable">
          <target>
             <endpoint>
    
                <address 
    uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=topic"/>
             </endpoint>
             <inSequence>
                <property name="OUT_ONLY" value="true"/>
             </inSequence>
             <outSequence>
                <send/>
             </outSequence>
          </target>
       </proxy>
    </definitions>
    Info

    If you are using the source view in the management console, you must use '&amp;' instead of '&' in endpoint URLs, as shown in the example above. If you are saving this proxy service configuration as an XML file in the proxy-services directory, use '&' instead.

...