Transformer SDK For C  8.0.2.290852-a608fcd3
Configuration: Persistence

The persistence module allows the transformer to store data in a datastore. The default configuration makes the module load up an in-process sqlite3 database and stores data into a file that can be configured via the persistence.conf configuration file.

For production environments that use a transformer cluster it is advised not to use the sqlite3/filedb persistence as it does not synchronize it's state over the cluster. It is recommended to use the javadb/jdbc layer and connect the persistence module of all transformers in the cluster to a central Database.

Loading Persistence

To load the persitence module add the following to transformer.conf

add-module  persistence 
Options

persistence-filedb-libs

Type: String Array
Default: None

Array of C libraries containing functions to be treated as stored procedures. This option is available when filedb is enabled (i.e. if enable-file-database is set to true) as sqlite does not support stored procedures.

The interface for additional C libraries simply requires you to have an initialise function with the filedb_init_function signature defined in persistence.h. In this initialise function should use the register_procedure_cb to register functions as procedures with the persistence module. Further documentation can be found at http://www.caplin.com/developer/caplin-platform/transformer/transformer-persist-data-to-transformer.


persistence-filedb-bootstrap

Type: String Array
Default: None

Array of SQL files to be executed when the module loads. This option is only available if enable-file-database is set to true


enable-file-database

Type: Boolean
Default: FALSE

Turn on or off file DB, only when this config option is set to false file database will be disabled


persistence-classid

Type: String
Default: None

When enable-file-database is set to false this option specifies the classid of the java persistence adapter to be loaded and used as a bridge between transformer and a database


add-database-params

Configuration group add-database-params

Start a database params configuration group. This config group gets passed into the persistence implementation loaded and can be used for custom java persistence adapters.

Format:

add-database-params
    init-string         [value]
    driver-name         [value]
    username            [value]
    password            [value]
    extra-params        [values]
end-database-paarms

extra-params

Type: String Array
Default: None

Array of extra arguments to be passed into a custom java persistence adapters. In case of the default Jdbc implementation this takes exactly one argument of type int and specifies number in seconds to wait for a call to Connection.isValid() to return.


init-string

Type: String
Default: None

Initialisation string for the database. For File/SQLite DB this specifies the location where the database file should be stored, for the default JDBC implementation this specifies the JDBC URL.


driver-name

Type: String
Default: None

The Jdbc driver name of the driver to be used by the JDBC default implementation. The driver needs to be made available to transformer.


username

Type: String
Default: None

The username required to authenticate with the database


password

Type: String
Default: None

The password required to authenticate with the database



logfile

Type: String
Default: persistence.log

Logfile


log-level

Type: String
Default: INFO

Specify the level at which logs are reported. This can take the following values (in order of decreasing severity/increasing verbosity):

log-level name Description
CRIT Reports critical errors that prevent the application from running.
ERROR Reports serious errors regarding network connections and all errors included in the CRIT log level.
NOTIFY Reports errors regarding data corruptions and all errors included in the ERROR and CRIT log levels.
WARN Reports minor errors and all errors included in the NOTIFY, ERROR and CRIT log levels.
INFO Reports events and information regarding normal operation, and all errors included in the WARN, NOTIFY, ERROR and CRIT log levels.
DEBUG Reports tracing information and all logs at a higher level.
FINER Reports more deatiled tracing information and all logs at a higher level.
FINEST Reports more deatiled tracing information and all logs at a higher level.


Generated on Wed Jul 31 2024 18:00:14 for Transformer SDK For C