Using Configuration to configure basic endpoint - 8.0

Talend ESB Service Developer Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2023-11-06

In addition to using the WSDL file to specify the connection information for a JMS endpoint, you can also supply it in the endpoint's XML configuration. The information in the configuration file will override the information in the endpoint's WSDL file.

You configure a JMS endpoint using one of the following configuration elements:

  • jms:conduit : The jms:conduit element contains the configuration for a consumer endpoint. It has one attribute, name , whose value takes the form

    {WSDLNamespace}WSDLPortName.jms-conduit
  • jms:destination : The jms:destination element contains the configuration for a provider endpoint. It has one attribute, name , whose value takes the form

    {WSDLNamespace}WSDLPortName.jms-destination

    .

JMS connection information is specified by adding a jms:address child to the base configuration element. The jms:address element used in the configuration file is identical to the one used in the WSDL file. Its attributes are listed in the address element's attribute table . Like the jms:address element in the WSDL file, the jms:address configuration element also has a jms:JMSNamingProperties child element that is used to specify additional information used to connect to a JNDI provider.

Addressing Information in a Configuration File

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:ct="http://cxf.apache.org/configuration/types"
   xmlns:jms="http://cxf.apache.org/transports/jms"
   xsi:schemaLocation="
      http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans.xsd
      http://cxf.apache.org/jaxws 
      http://cxf.apache.org/schemas/jaxws.xsd
      http://cxf.apache.org/transports/jms 
      http://cxf.apache.org/schemas/configuration/jms.xsd">
   <jms:conduit 
      name="{http://cxf.apache.org/jms_endpt}HelloJMSPort.jms-conduit">
      <jms:address destinationStyle="queue"
         jndiConnectionFactoryName="myConnectionFactory"
         jndiDestinationName="myDestination"
         jndiReplyDestinationName="myReplyDestination"
         connectionUserName="testUser"
         connectionPassword="testPassword">
         <jms:JMSNamingProperty name="java.naming.factory.initial"
            value="org.apache.cxf.transport.jms.MyInitialContextFactory"/>
         <jms:JMSNamingProperty name="java.naming.provider.url"
            value="tcp://localhost:61616"/>
      </jms:address>
   </jms:conduit>
</beans>