Skip to main content

Configuration

This page describes how to configure external SQL connections in the Genesis Application Platform.

Database connections are defined using system definitions, where properties have the following hierarchy: sql.{connection-name}.{property}.

Where {connection-name} will be how the connection is referred in the @RepositoryModule annotation. The connection will also become a @Named injectable.

A connection will become available as soon as a jdbcUrl property for it has been assigned, and this is the only required property. All other properties match the standard Genesis SQL database properties defined here, as per the table below.

Apart from jdbcUrl, username and password, other properties will default to the system definition property, or their framework specified default.

PropertyRequiredSystem Definition Property
jdbcUrl✔️n/a
usernamen/a
passwordn/a
connectionMaximumPoolSizeDbSqlMaxPoolSize
connectionTimeoutDbSqlConnectionTimeoutMillis
idleTimeoutDbSqlIdleTimeoutMillis
maxLifetimeDbSqlMaxLifetimeMillis
minimumIdleDbSqlMinimumIdleMillis
validationTimeoutDbSqlValidationTimeoutMillis
keepaliveTimeDbSqlKeepaliveTimeMillis
leakDetectionThresholdDbSqlLeakDetectionThresholdMillis
cachePrepStmtsDbSqlCachePrepStmts
prepStmtCacheSizeDbSqlPrepStmtCacheSize
prepStmtCacheSqlLimitDbSqlPrepStmtCacheSqlLimit
resultSetFetchSizeDbSqlResultSetFetchSize
sqlCatalogDbSqlCatalog
connectionInitQueryDbSqlConnectionInitSql
connectionTestQueryDbSqlConnectionTestQuery