Record -
sql
: PoolOptions
Represents the properties which are used to configure DB connection pool. Default values of the fields can be set through the configuration API.
Fields
- connectionInitSql string config:getAsString(b7a.sql.connection.init.sql, defaultValue=)
-
SQL statement that will be executed after every new connection creation before adding it to the pool. Default value of this field can be set through the configuration API with the key "b7a.sql.connection.init.sql"
- dataSourceClassName string config:getAsString(b7a.sql.datasource.class.name, defaultValue=)
-
Name of the DataSource class provided by the JDBC driver. This is used on following scenarios. 1. In JDBC client when DB specific properties are required (which are given with dbOptions) 2. In any data client in which XA transactions enabled by isXA property and need to provide a custom XA implementation. Default value of this field can be set through the configuration API with the key "b7a.sql.datasource.class.name"
- autoCommit boolean config:getAsBoolean(b7a.sql.connection.auto.commit, defaultValue=true)
-
Auto-commit behavior of connections returned from the pool. Default value of this field can be set through the configuration API with the key "b7a.sql.connection.auto.commit"
- isXA boolean config:getAsBoolean(b7a.sql.xa.enabled, defaultValue=false)
-
Whether Connections are used for a distributed transaction. Default value of this field can be set through the configuration API with the key "b7a.sql.xa.enabled"
- maximumPoolSize int config:getAsInt(b7a.sql.max.pool.size, defaultValue=15)
-
Maximum size that the pool is allowed to reach, including both idle and in-use connections. Default value of this field can be set through the configuration API with the key "b7a.sql.max.pool.size"
- connectionTimeout int config:getAsInt(b7a.sql.connection.time.out, defaultValue=30000)
-
Maximum number of milliseconds that a client will wait for a connection from the pool. Default is 30 seconds. Default value of this field can be set through the configuration API with the key "b7a.sql.connection.time.out"
- idleTimeout int config:getAsInt(b7a.sql.connection.idle.time.out, defaultValue=600000)
-
Maximum amount of time that a connection is allowed to sit idle in the pool. Default is 10 minutes. Default value of this field can be set through the configuration API with the key "b7a.sql.connection.idle.time.out"
- minimumIdle int config:getAsInt(b7a.sql.connection.min.idle.count, defaultValue=15)
-
Minimum number of idle connections that pool tries to maintain in the pool. Default is same as maximumPoolSize. Default value of this field can be set through the configuration API with the key "b7a.sql.connection.min.idle.count"
- maxLifetime int config:getAsInt(b7a.sql.connection.max.life.time, defaultValue=1800000)
-
Maximum lifetime of a connection in the pool. Default is 30 minutes. Default value of this field can be set through the configuration API with the key "b7a.sql.connection.max.life.time"
- validationTimeout int config:getAsInt(b7a.sql.validation.time.out, defaultValue=5000)
-
Maximum amount of time that a connection will be tested for aliveness. Default 5 seconds Default value of this field can be set through the configuration API with the key "b7a.sql.validation.time.out"