Additional database-related settings
All the settings below can be added at the schema level. For example, the statistics database can become very large over time, so you may want to use a separate server for the statistics database.
Connection and pool parameters can be added to the configuration file. In such a case, all other schemas would use the default connection pool.
com.unblu.storage.database.platform=Auto com.unblu.storage.database.driver=org.h2.Driver com.unblu.storage.database.url=jdbc\:h2\:mem\:unblu com.unblu.storage.database.jdbcProperties= com.unblu.storage.database.user=unblu com.unblu.storage.database.password=secret com.unblu.storage.database.schema=unblu com.unblu.storage.database.liquibaseSchema= com.unblu.storage.database.adminJdbcProperties= com.unblu.storage.database.adminUser= com.unblu.storage.database.adminPassword= com.unblu.storage.database.poolMax=50 com.unblu.storage.database.poolMinIdle= com.unblu.storage.database.adminUser= com.unblu.storage.database.adminPassword=
The default JDBC connection pool is HikariCP. It provides improvements in both speed and stability compared to the deprecated EclipseLink connection pool:
Connections are closed when not used for a longer period.
Connections are validated before using
java.sql.Connection.isValid(int)provided by the JDBC Driver. For more information refer to the Java documentation.
New connections are opened proactively, not just on demand.
A Grafana dashboard called "Database (HikariCP)" visualizing all HikariCP metrics is automatically deployed with every Unblu cluster installation.
# Database connection pool com.unblu.storage.database.datasourceFactory=HIKARI com.unblu.storage.database.poolMax=20 (1) com.unblu.storage.database.poolMinIdle=20 (2)
|1||Maximum number of connections in the pool.|
|2||Minimum number of connections that should be idle, new connections are added to the pools when connections are busy up to the configured maximum number of connections.|
The configuration above reflects the default settings. Only add a connection pool configuration if you want to deviate from this default. For production setups, the following values may be more appropriate:
|Instead of the approaches listed in this section, you can also use a data source provided by the application server. For instructions, refer to Managing connections to the database server using JNDI datasource.|
The audit log stores its entries in the table
audit_table. The table may be in a separate database schema or on a different database server entirely. If you choose to store the audit log on a different database server, it must be the same type of database server as the database used by the Unblu server.
There are properties for the audit log database configuration that you can use to override the standard database configuration properties:
com.unblu.storage.database.audit.platform= com.unblu.storage.database.audit.datasourceFactory= com.unblu.storage.database.audit.datasourceName= com.unblu.storage.database.audit.driver= com.unblu.storage.database.audit.url= com.unblu.storage.database.audit.jdbcProperties= com.unblu.storage.database.audit.user= com.unblu.storage.database.audit.password= com.unblu.storage.database.audit.schema= com.unblu.storage.database.audit.adminDatasourceFactory= com.unblu.storage.database.audit.adminDatasourceName= com.unblu.storage.database.audit.adminJdbcProperties= com.unblu.storage.database.audit.adminUser= com.unblu.storage.database.audit.adminPassword= com.unblu.storage.database.audit.poolInitial= com.unblu.storage.database.audit.poolMax= com.unblu.storage.database.audit.poolMinIdle=