The UM Gateway configuration is controlled via an XML configuration file. The DTD for the UM Gateway configuration file is described in the DTD reference.
Several example UM Gateway configuration files, along with detailed explanations, can be found in UM Gateway Examples.
Note: Before designing any UM Gateway implementations based on configurations or examples other than those presented in this document, please contact your technical support representative.
With the <lbm-config> element, you can import configurations from either a plain text or XML UMconfiguration file. However, using XML configuration files provides the following advantages over plain text UM configuration files.
UM attributes can be applied per topic and/or per context.
Attributes applied to all portals on a particular gateway can be inherited from an UM XML template, instead of being set for each individual portal.
See XML Configuration Files for more information about UM XML configuration.
Note: You should use UM XML templates to set options for individual portals because the UM Gateway processes UM XML configuration files in the <daemon> element and not within each portal's configuration as with plain text UM configuration files.
Note: Each gateway endpoint must have its request_tcp_interface option set when the gateway starts, therefore, you must set it in each <endpoint> element of the UM Gateway XML configuration file and not in an UM XML configuration file, which is implemented when the gateway creates UM objects such as proxy sources and receivers,
<endpoint> <name>Endpoint-1</name> <domain-id>1</domain-id> <lbm-attributes> <option name="request_tcp_interface" scope="context" value="10.29.3.0/24" /> </lbm-attributes> </endpoint>
When setting endpoint options, name the context of each endpoint in the gateway's XML configuration file.
<portals> <endpoint> <name>Endpoint_1</name> <domain-id>1</domain-id> <source-context-name>endpt_1</source-context-name> <lbm-attributes> <option name="request_tcp_interface" scope="context" value="#.#.#.0/24" /> </lbm-attributes> </endpoint> <endpoint> <name>Endpoint_2</name> <domain-id>2</domain-id> <receiver-context-name>endpt_2</source-context-name> <lbm-attributes> <option name="request_tcp_interface" scope="context" value="#.#.#.0/24" /> </lbm-attributes> </endpoint> </portals>
Then assign configuration templates to those contexts in the UM XML configuration file.
<application name="tnwgd" template="global"> <contexts> <context name="endpoint_1" template="endpt-1-options"> <sources /> </context> <context name="endpoint_2" template="endpt-2-options"> <sources /> </context> </contexts> </application>
You specify the unique options for each of this gateway's two endpoints in the UM XML configuration <templates> section used for endpt-1-options and endpt-2-options.
One advantage of using UM XML configuration files with the UM Gateway is the ability to assign unique UM attributes to the topics and contexts used for the proxy sources and proxy receivers the gateway creates. Plain text UM configuration files cannot assign UM attributes to the proxy sources and receivers based on topic. The following example shows how to assign a different LBTRM multicast address to a source based on its topic.
Create a new UM XML configuration template for the desired topic name.
<template name="custom-topic-template"> <options type="source"> <option name="transport_lbtrm_multicast_address" default-value="#.#.#.#"/> </options> </template>
Then include this template in the <application> element associated with the gateway.
<application name="tnwgd" template="global-options"> <contexts> <context> <sources template="source-options"> <topic topicname="custom_topic_name" template="custom-topic-template" /> </sources> </context> </contexts> </application>
This assigns the specified UM options to sources created on a particular topic.
It is also possible to assign UM attributes directly in the <application> tag. For example, the following specifies that a particular topic should use LBTRU transport and a unicast resolver address.
<application name="tnwgd" template="tnwgd-common"> <contexts> <context> <sources template="source-template"> <topic topicname="LBTRU_TOPIC"> <options type="source"> <option name="transport" default-value="lbtru" /> <option name="resolver_unicast_address" default-value="#.#.#.#" /> </options> </topic> </sources> </context> </contexts> </application>
The following sample configuration incorporates many of the examples mentioned above. The gateway applies options to all UM objects created. The UM XML configuration file overwrites these options for two specific topics. The first topic, LBTRM_TOPIC, uses a different template to change its transport from TCP to LBTRM, and to set an additional property. The second topic, LBTRU_TOPIC, also changes its transport from TCP to a new value. However, its new attributes are applied directly in its associated topic tag, instead of referencing a template. In addition, this sample configuration assigns all sources and receivers associated with the context endpt_1 the rm-source template.
UM XML Configuration File
<?xml version="1.0" encoding="UTF-8" ?> <um-configuration version="1.0"> <templates> <template name="tnwgd-common"> <options type="source"> <option name="transport" default-value="tcp" /> </options> <options type="context"> <option name="request_tcp_interface" default-value="#.#.#.#/#" /> <option name="transport_tcp_port_low" default-value="#" /> <option name="transport_tcp_port_high" default-value="#" /> <option name="resolver_multicast_address" default-value="#.#.#.#"/> </options> </template> <template name="rm-source"> <options type="source"> <option name="transport" default-value="lbtrm" /> <option name="transport_lbtrm_multicast_address" default-value="#.#.#.#"/> </options> </template> </templates> <applications> <application name="tnwgd" template="tnwgd-common"> <contexts> <context> <sources template="rm-source"> <topic topicname="LBTRM_TOPIC" template="rm-source" /> <topic topicname="LBTRU_TOPIC"> <options type="source"> <option name="transport" default-value="lbtru" /> <option name="resolver_unicast_address" default-value="#.#.#.#" /> </options> </topic> </sources> </context> <context name="endpt_1" template="rm-source"> <sources template="rm-source"/> </context> </contexts> </application> </applications> </um-configuration>
Gateway XML Configuration File
This gateway uses the above XML file, called sample-config.xml, to set its UM options. It has three endpoints, one of which has the context endpt_1.
<?xml version="1.0" encoding="UTF-8" ?> <tnw-gateway version="1.0"> <daemon> <log type="console"/> <xml-config>sample-config.xml</xml-config> </daemon> <portals> <endpoint> <name>Endpoint_1</name> <domain-id>1</domain-id> <lbm-attributes> <option name="context_name" scope="context" value="endpt_1" /> <option name="request_tcp_interface" scope="context" value="#.#.#.0/24" /> </lbm-attributes> </endpoint> <endpoint> <name>Endpoint_2</name> <domain-id>2</domain-id> <lbm-attributes> <option name="request_tcp_interface" scope="context" value="#.#.#.0/24" /> </lbm-attributes> </endpoint> <endpoint> <name>Endpoint_3</name> <domain-id>3</domain-id> <lbm-attributes> <option name="request_tcp_interface" scope="context" value="#.#.#.0/24" /> </lbm-attributes> </endpoint> </portals> </tnw-gateway>
Copyright (c) 2004 - 2014 Informatica Corporation. All rights reserved.