This section explains the setup file for describing the RDB reference definition (RDB reference definition file).
The RDB reference definition file is an XML file that has "database" as the root element. An RDB reference definition file is created for each RDB server.
The items required in the RDB reference definition file depend on the RDB to be referenced.
Element or attribute | Item name | Explanation | Allowed values | Mandatory/ |
---|---|---|---|---|
id (attribute of "database") | Development asset ID | ID that uniquely identifies the RDB reference definition. Used as the database name in complex event processing rules. | Up to 39 alphanumeric characters, underscores (_), or hyphens (-). Note: The first character must be a letter. | Mandatory |
comment | Comment | Explanation of this definition. | Up to 1,000 characters. | Optional |
dbName | Database name | Database name. | Up to 36 alphanumeric characters, underscores (_), or hyphens (-). | Mandatory |
schema | Schema name | Schema name. | Up to 36 alphanumeric characters. | Mandatory |
url | Database URL | Specify the following values: hostNameOrIpAddress:portNumber If the host name of the server to be connected is in FQDN (Fully Qualified Domain Name) format, specify the name excluding the domain name. | Up to 512 alphanumeric characters, hyphens (-), periods (.), or colons (:). | Mandatory |
user | Access ID | Name of the user who will connect to the RDB server. | Up to 36 alphanumeric characters. | Mandatory |
password | Access password | Password of the user who will connect to the RDB server. When the cepgetrsc command is used to reference definition information, this password is replaced by "*****" in the displayed output. | Up to 512 alphanumeric characters and the following symbols: /%_# | Mandatory |
maxAge | Cache retention period | Time period (in seconds) for which RDB reference results are cached. If not caching results, omit the element, specify an empty value, or specify 0. | Integer from 0 to 2147483647 | Optional |
purgeInterval | Cache purge interval | Time interval (in seconds) at which a cache of RDB reference results will be flushed. A cache that is older than the cache retention period is flushed at this interval. If not caching results, omit the element or specify an empty value. | Integer from 1 to 2147483647 | Optional |
Element or attribute | Item name | Explanation | Allowed values | Mandatory/ |
---|---|---|---|---|
id (attribute of "database") | Development asset ID | ID that uniquely identifies the RDB reference definition. Used as the database name in complex event processing rules. | Up to 39 alphanumeric characters, underscores (_), or hyphens (-). Note: The first character must be a letter. | Mandatory |
comment | Comment | Explanation of this definition. | Up to 1,000 characters. | Optional |
jdbcClass | JDBC driver class | Class of the JDBC driver. Set the following value: org.postgresql.Driver | Up to 1,023 alphanumeric characters and symbols. | Mandatory |
url | Database URL | URL of the database to be connected. | Up to 512 alphanumeric characters and the following symbols: %:/?#[]@!$&'() | Mandatory |
user | Access ID | Name of the user who will connect to the RDB server. | Up to 512 characters. | Mandatory |
password | Access password | Password of the user who will connect to the RDB server. When the cepgetrsc command is used to reference definition information, this password is replaced by "*****" in the displayed output. | Up to 512 characters. | Mandatory |
maxAge | Cache retention period | Time period (in seconds) for which RDB reference results are cached. If not caching results, omit the element, specify an empty value, or specify 0. | Integer from 0 to 2147483647 | Optional |
purgeInterval | Cache purge interval | Time interval (in seconds) at which a cache of RDB reference results will be flushed. A cache that is older than the cache retention period is flushed at this interval. If not caching results, omit the element or specify an empty value. | Integer from 1 to 2147483647 | Optional |
Note
If you use the cepgetrsc command to reference definition information, the access password will be replaced by "*****" in the displayed output. However, if you directly enter the access password in the database URL, the password is displayed on the screen. For security reasons, do not directly enter the access password in the database URL.
If you specify the password in the RDB reference definition file, for security reasons you should delete the access password from the definition file after deployment to the CEP engine is complete, or alternatively delete the entire definition file.
Even when backing up the RDB reference definition file, delete the access password from the definition file or encrypt the entire definition file to ensure that the password cannot be referenced.
Example
Definition examples of the RDB reference definition
Below are definition examples for connecting to the various RDB types. In each example, the results of referencing the database "MyDB" on the RDB server "RERDB01" are held in the cache for 1 hour (3600 seconds). The cache is checked every 10 minutes (600 seconds) to see if the retention period has elapsed.
Symfoware Server (referenced with the native interface) definition example
This example connects to a relational database using the schema name "user01", port number "26551", access ID "user01", and access password "bdcep".
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<database xmlns="urn:xmlns-fujitsu-com:cspf:bdcep:v1" id="RDBREF_01">
<comment>RDB reference definition_01</comment>
<dbName>MyDB</dbName>
<schema>user01</schema>
<url>RERDB001:26551</url>
<user>user01</user>
<password>bdcep</password>
<maxAge>3600</maxAge>
<purgeInterval>600</purgeInterval>
</database>
Symfoware Server (Open Interface) definition example
This example connects to a relational database using the port number "26500", access ID "user01", and access password "bdcep".
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<database xmlns="urn:xmlns-fujitsu-com:cspf:bdcep:v1" id="RDBREF_01">
<comment>RDB reference definition_01</comment>
<jdbcClass>org.postgresql.Driver</jdbcClass>
<url>jdbc:postgresql://RERDB01:26500/MyDB</url>
<user>user01</user>
<password>bdcep</password>
<maxAge>3600</maxAge>
<purgeInterval>600</purgeInterval>
</database>
PostgreSQL definition example
This example connects to a relational database using the port number "26500", access ID "user01", and access password "bdcep".
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<database xmlns="urn:xmlns-fujitsu-com:cspf:bdcep:v1" id="RDBREF_01">
<comment>RDB reference definition_01</comment>
<jdbcClass>org.postgresql.Driver</jdbcClass>
<url>jdbc:postgresql://RERDB01:26500/MyDB</url>
<user>user01</user>
<password>bdcep</password>
<maxAge>3600</maxAge>
<purgeInterval>600</purgeInterval>
</database>