Overview

The Connection Manager oversees connections to various types servers. It maintains a registry of server connections and provides an interface for interacting with the servers. The relevant interfaces are shown in the attached diagram.

  • The IConnectionManager interface is implemented in the OpenEdge.CommonInfrastructure.Common.ConnectionManager class.
  • Server types are defined by the ConenctionTypeEnum enumeration
  • Servers can be programatically added via the IConnectionManager:RegisterConnection method, or can be loaded from an XML file specified on the command line.

XML Configuration

Server connections and their parameters can be supplied to the session via an XML file. An XML file is used as since it's more platform-portable than an INI (unfortunately at the expense of some readability). JSON was also considered but there are some bugs in the READ-JSON code (as of 10.2B04) which removed that format from consideration. This may change with future releases (since JSON is more readable IMO).

XML Structure

Each configuration has a config node with a name element. This is used to uniquely identify the configuration once it has been loaded.

A config node has a series of serverconnection elements, which identify the various connections. These need a type (which maps back to the ConnectionTypeEnum) and name(used to uniquely identify that connection within its type).

Each serverconnection element has a number of parameter elements, which have a name and value. The name depends on the server connection type.

Sample config.xml file

<?xml version="1.0" encoding="UTF-8"?>
<configs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <config>
    <name>default</name>
    <serverconnection>
      <type>appserver</type>
      <name>asAutoEdgeTheFactory</name>
      <parameter>
        <name>AppService</name>
        <value>dev_asAutoEdgeTheFactory</value>
      </parameter>
      <parameter>
        <name>sessionModel</name>
        <value>session-free</value>
      </parameter>
    </serverconnection>
    <serverconnection>
      <type>bpmserver</type>
      <name>bpmAutoEdgeTheFactory</name>
      <enabled>true</enabled>
      <parameter>
        <name>host</name>
        <value>10.128.48.41</value>
      </parameter>
      <parameter>
        <name>port</name>
        <value>18793</value>
      </parameter>
    </serverconnection>
  </config>
</configs>

The config.xml file is generated by the installer for both client and server sessions, and is stored in the autoedgethefactory/[client|server]/cfg folder.

Session startup parameters

ABL sessions on both client and server (ie AppServer startup) run the OpenEdge/CommonInfrastructure/Common/start_session.p procedure. This procedure start the InjectABL container and also the Service Manager. It also loads and caches the config XML file specified on the command line into the ABLSession object's SessionProperties. The -param switch is used to specify the config file name and location, and also the config name to use.

The default parameters are in ./autoedgethefactory/client/cfg/client.pf and are

-param CFGFILE=./autoedgethefactory/client/cfg/config.xml,CFGNAME=default

The server-side entries look similar.






Connection Manager