XX1 Metapool Adapter Configuration

The XX1 Metapool Adapter provides universal host resource pooling for host adapter that implement the XX1 Metapool Driver Interface. Normally, when a developer creates a new provider adapter for XX1, he is responsible for implementing session management and resource pooling. By using the Metapool Adapter, the developer only needs to implement the connect, disconnect and transaction procedure. The Metapool Adapter provides the following features:

  • Session and Resource Pooling
  • Combine multiple pools on different hosts to one large pool
  • Connection Caching
  • Session Queueing
  • Keep-Alive
  • Remote Session Monitoring
  • Remote Transaction Tracing
  • Exception Logging

Each Metapool Host Driver should have its own configuration file and is listed as the xxscfg.xml adapter entry. The name of the runtime library is xxmetapool and loaded as follows through the main configuration:

<provider>
    <adapter name="MyHost" lib="xxmetapool" config="myhostmpcfg.xml"/>
    <adapter name="MyHost2" lib="xxmetapool" config="myhost2mpcfg.xml"/>

The following section describes the universal configuration layout for all Metapool configuration files. There can be differences per adapter.

 

Configuration Parameter

NodeDescription
driversList of Driver libraries to be loaded for this configuration. You can combine resources from different host connections and implementations into a single large session pool.
drivers/driver

Driver specification.

Attributes:

  • name : Driver name reference used in this configuration
  • lib : Driver library name (.dll or .so)
drivers/driver/(custom)Optional custom driver instance configuration.
errorlog(optional) Enable exception automatic logging by Metapool. Error log messages are usually implemented on driver level. Enabling this log may result in duplication of information.
errorlog/folderDirectory on server where log files are written. The filenames are generated from Host and Session Pool name.
errorlog/fileopenmode

Log file open mode at server startup.

Values:

  • append : Append log data to existing file.
  • everything else or omitting the element resets the log file
sessionsList of session pools that are created at server startup.
sessions/session

Session pool.

Attributes:

  • @name : Pool name. Addressed by client through the TC header with /tc/provider/@session attribute.
  • @provider: Provider name reference. Adressed by client through the TC header with /tc/provider.
  • @driver : Default driver (name reference) to be used for nodes in pool.
  • @config : Default configuration (name reference) to be used for nodes in pool.
  • @kpa : (optional) Default Keep Alive Profile (name reference) to be  used for nodes in pool. Default is no keep alive polling.
  • @nodes : Number of session nodes (slots) allocated and available for pool.
  • @queue : Number of queue slots if pool is busy.
  • @timeout : Maximum number of seconds a client request waits on queue.
  • @history : (optional) Number of host responses to be kept in a recall cache. Can be used by business logic script by sending a XXMP: RECALL request to the adapter. DO NOT specify if not required by business function implementation!
  • @order : (optional). Order how nodes (slots) are allocated. Default is Top-Down. Specify revert for Bottom-Up allocation.
  • @access : (optional). Metapool access scheme for session nodes (slots). Default is first available node in node array (starting from index 1). Specify cycle for round robin algorithm.
sessions/session/node

(optional) Session node. Typically relates to a host terminal/device address or host session.

Attributes:  

  • @name: (optional) Name of node. Default is the 4 digit Hex index of the slot position. Can be used by client through TC to address specific node with /tc/provider/@node attribute.
  • @driver : (optional) driver to be used for this node.
  • @config : (optional) configuration to be used for this node
  • @kpa : (optional) Keep Alive profile to be used for this node
  • @history : (optional) Recall history cache size for this node
  • @(custom) : (optional) Driver implementation specific node parameter
The number of element nodes listed can not exceed the value specified in the @nodes attribute of the session parent element. If less or no nodes are listed, the default attributes on the session parent element apply on each node that is not listed.
configurationsList of host connection configurations.
configurations/config

Connection configuration.

Attributes:

  • @name : Name reference of configuration for session pools in this file.
  • @maxnodes : (optional) Maximum number of session nodes that can reference this configuration. Useful for integrity checking, if the host has a limited number of resources.
configurations/config/(custom)Driver implementation specific host connection configuration parameters.
kpaprofilesContains list of Keep Alive profiles for session nodes.
kpaprofiles/kpa

Keep Alive profile.

Attributes:

  • @name : Name reference of profile for session pools in this file.
  • @type : Session polling type. Values:
    • active: connect session node at startup and permanently monitor connection
    • passive: connect session node upon first client request and disconnect on inactivity
  • @interval : Monitoring interval in seconds. At interval, the Keep Alive implementation of the driver is called.
  • @inactivity : Inactivity period in seconds. When expired the node is disconnected from the host.

 

Example:

<metapool>
<drivers>
<driver name="MyHost" lib="mymetapooldriver">
<!-- Custom driver instance configuration goes here -->
</driver>
</drivers>
<!-- definition for session specific log files:-->
<errorlog>
<!-- folder: directory where session specific log files are written to -->
<folder>../log/MyHost</folder>
<!-- fileopenmode: mode of session specific log file handling at server start:
- create: create a new log file. This will replace a possibly already existing log file
- append: reuse existing log file and append log entries at the end of the existing file-->
<fileopenmode>append</fileopenmode>
</errorlog>
<mptrace>on</mptrace>
<sessions>
<session name="Pool1" provider="MyHost" nodes="20" queue="10" timeout="60" driver="MyHost" config="Pool1" kpa="Passive">
<node name="Node1" kpa="Active"/>
<node name="Node2"/>
</session>
<session name="Pool2" provider="MyHost" nodes="50" driver="MyHost" config="Pool2" kpa="Passive"/>
</sessions>
<configurations>
<config name="Pool1">
<!-- Custom Pool configuration goes here. Elements depend on driver implementation -->
</config>
<config name="Pool2">
</config>
</configurations>
<kpaprofiles>
<kpa name="Active" type="active" interval="50"/>
<kpa name="Passive" type="passive" inactivity="300"/>
</kpaprofiles>
</metapool>