Attribute
| Description
|
defaultAutoCommit
| (boolean) The default auto-commit state of connections created by thispool. If not set, default is JDBC driver default (If not set then the setAutoCommit method will not be called.)
|
defaultReadOnly
| (boolean) The default read-only state of connections created by thispool. If not set then the setReadOnly methodwill not be called. (Some drivers don't support read only mode, ex:Informix)
|
defaultTransactionIsolation
| (String) The default TransactionIsolation state of connections createdby this pool. One of the following: (see javadoc )
- NONE
- READ_COMMITTED
- READ_UNCOMMITTED
- REPEATABLE_READ
- SERIALIZABLE
If not set, the method will not be called and itdefaults to the JDBC driver.
|
defaultCatalog
| (String) The default catalog of connections created by this pool.
|
driverClassName
| (String) The fully qualified Java class name of the JDBC driver to beused. The driver has to be accessible from the same classloader astomcat-jdbc.jar
|
username
| (String) The connection username to be passed to our JDBC driver toestablish a connection. Note, at this point, DataSource.getConnection(username,password) is not using the credentials passed into themethod.
|
password
| (String) The connection password to be passed to our JDBC driver toestablish a connection. Note, at this point, DataSource.getConnection(username,password) is not using the credentials passed into themethod.
|
maxActive
| (int) The maximum number of active connections that can be allocatedfrom this pool at the same time. The default value is 100
|
maxIdle
| (int) The maximum number of connections that should be kept in thepool at all times. Default value is maxActive:100 Idleconnections are checked periodically (if enabled) and connections that beenidle for longer than minEvictableIdleTimeMillis will be released. (also see testWhileIdle)
|
minIdle
| (int) The minimum number of established connections that should bekept in the pool at all times. The connection pool can shrink below thisnumber if validation queries fail. Default value is derived from initialSize:10 (also see testWhileIdle)
|
initialSize
| (int)The initial number of connections that are created when the poolis started. Default value is 10
|
maxWait
| (int) The maximum number of milliseconds that the pool will wait (whenthere are no available connections) for a connection to be returned beforethrowing an exception. Default value is 30000 (30 seconds)
|
testOnBorrow
| (boolean) The indication of whether objects will be validated beforebeing borrowed from the pool. If the object fails to validate, it will bedropped from the pool, and we will attempt to borrow another. NOTE - for atrue value to have any effect, the validationQuery parameter must be set to a non-null string. Inorder to have a more efficient validation, see validationInterval. Default value is false
|
testOnReturn
| (boolean) The indication of whether objects will be validated beforebeing returned to the pool. NOTE - for a true value to have any effect, thevalidationQuery parameter must be set to a non-null string. Thedefault value is false.
|
testWhileIdle
| (boolean) The indication of whether objects will be validated by theidle object evictor (if any). If an object fails to validate, it will bedropped from the pool. NOTE - for a true value to have any effect, the validationQuery parameter must be set to a non-null string. Thedefault value is false and thisproperty has to be set in order for the pool cleaner/test thread is to run(also see timeBetweenEvictionRunsMillis)
|
validationQuery
| (String) The SQL query that will be used to validate connections fromthis pool before returning them to the caller. If specified, this querydoes not have to return any data, it just can't throw a SQLException. The default value is null. Example values are SELECT 1(mysql),select 1 fromdual(oracle), SELECT 1(MS Sql Server)
|
validatorClassName
| (String) The name of a class which implements the org.apache.tomcat.jdbc.pool.Validator interface and provides a no-arg constructor (maybe implicit). If specified, the class will be used to create a Validatorinstance which is then used instead of any validation query to validateconnections. The default value is null. An examplevalue is com.mycompany.project.SimpleValidator.
|
timeBetweenEvictionRunsMillis
| (int) The number of milliseconds to sleep between runs of the idleconnection validation/cleaner thread. This value should not be set under 1second. It dictates how often we check for idle, abandoned connections, andhow often we validate idle connections. The default value is 5000 (5 seconds).
|
numTestsPerEvictionRun
| (int) Property not used in tomcat-jdbc-pool.
|
minEvictableIdleTimeMillis
| (int) The minimum amount of time an object may sit idle in the poolbefore it is eligible for eviction. The default value is 60000 (60 seconds).
|
accessToUnderlyingConnectionAllowed
| (boolean) Property not used. Access can be achieved by calling unwrap on the pooled connection. see javax.sql.DataSource interface, or call getConnection through reflection or or cast the object as javax.sql.PooledConnection
|
removeAbandoned
| (boolean) Flag to remove abandoned connections if they exceed the removeAbandonedTimout. If set to true a connection is consideredabandoned and eligible for removal if it has been in use longer than the removeAbandonedTimeout Setting this to true can recover db connections from applications that fail to close aconnection. See also logAbandoned Thedefault value is false.
|
removeAbandonedTimeout
| (int) Timeout in seconds before an abandoned(in use) connection can beremoved. The default value is 60 (60 seconds).The value should be set to the longest running query your applicationsmight have.
|
logAbandoned
| (boolean) Flag to log stack traces for application code whichabandoned a Connection. Logging of abandoned Connections adds overhead forevery Connection borrow because a stack trace has to be generated. Thedefault value is false.
|
connectionProperties
| (String) The connection properties that will be sent to our JDBCdriver when establishing new connections. Format of the string must be[propertyName=property;]* NOTE - The "user" and"password" properties will be passed explicitly, so they do notneed to be included here. The default value is null.
|
poolPreparedStatements
| (boolean) Property not used.
|
maxOpenPreparedStatements
| (int) Property not used.
|