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
Node | Description |
---|---|
drivers | List 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:
|
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/folder | Directory 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:
|
sessions | List of session pools that are created at server startup. |
sessions/session | Session pool. Attributes:
|
sessions/session/node | (optional) Session node. Typically relates to a host terminal/device address or host session. Attributes:
|
configurations | List of host connection configurations. |
configurations/config | Connection configuration. Attributes:
|
configurations/config/(custom) | Driver implementation specific host connection configuration parameters. |
kpaprofiles | Contains list of Keep Alive profiles for session nodes. |
kpaprofiles/kpa | Keep Alive profile. Attributes:
|
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>