In order to define the database back-end used for the application the following sections have to be overridden in the registry.properties file. This file can be placed in an arbitrary folder, that has to be referenced by the REGISTRYCXN_HOME environment variable.
The core registry database configuration is defined by the following block. Most of the parameters are very straightforward to modify. The validation query has to be adjusted to the database type: "SELECT 1" in case of PostgreSQL or MySQL, while "SELECT 1 FROM DUAL" in case of Oracle.
MySQL example
#APP DB SETTINGS
RegDBType=MySQL
RegDBDriver=com.mysql.jdbc.Driver
RegDBUrl=jdbc:mysql://127.0.0.1:3306/regsys?autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8
RegDBUser=regsys
RegDBPass=regsys
RegDBMaxActive=30
RegDBValidationQuery=SELECT 1
PostgreSQL example
#APP DB SETTINGS
RegDBType=PostgreSQL
RegDBDriver=org.postgresql.Driver
RegDBUrl=jdbc:postgresql://127.0.0.1:5432/regsys
RegDBUser=regsys
RegDBPass=regsys
RegDBMaxActive=30
RegDBValidationQuery=SELECT 1
Oracle example
#APP DB SETTINGS
RegDBType=Oracle
RegDBDriver=oracle.jdbc.driver.OracleDriver
RegDBUrl=jdbc:oracle:thin:@10.0.0.30:1521:orcl
RegDBUser=regsys
RegDBPass=regsys
RegDBMaxActive=30
RegDBValidationQuery=SELECT 1 FROM DUAL
An example implementation of a downstream consumer database is provided that uses a very similar database schema. The connection information for that schema can be described with the following parameters, the same way as the core database connectivity.
MySQL example
#Downstream DB SETTINGS
RegDSDBType=MySQL
RegDSDBDriver=com.mysql.jdbc.Driver
RegDSDBUrl=jdbc:mysql://127.0.0.1:3306/downstream?autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8
RegDSDBUser=downstream
RegDSDBPass=downstream
RegDSDBMaxActive=30
RegDSDBValidationQuery=SELECT 1
PostgreSQL example
#Downstream DB SETTINGS
RegDSDBType=PostgreSQL
RegDSDBDriver=org.postgresql.Driver
RegDSDBUrl=jdbc:postgresql://127.0.0.1:5432/downstream
RegDSDBUser=downstream
RegDSDBPass=downstream
RegDSDBMaxActive=30
RegDSDBValidationQuery=SELECT 1
Oracle example
#Downstream DB SETTINGS
RegDSDBType=Oracle
RegDSDBDriver=oracle.jdbc.driver.OracleDriver
RegDSDBUrl=jdbc:oracle:thin:@10.0.0.30:1521:orcl
RegDSDBUser=downstream
RegDSDBPass=downstream
RegDSDBMaxActive=30
RegDBValidationQuery=SELECT 1 FROM DUAL