Top Fields Constructors Methods
org.apache.tomcat.jdbc.pool.jmx

public Class ConnectionPool

extends NotificationBroadcasterSupport
implements ConnectionPoolMBean, MBeanRegistration
Class Inheritance
All Implemented Interfaces
javax.management.MBeanRegistration, org.apache.tomcat.jdbc.pool.jmx.ConnectionPoolMBean, org.apache.tomcat.jdbc.pool.PoolConfiguration
Imports
java.util.Properties, java.util.concurrent.ConcurrentLinkedQueue, java.util.concurrent.atomic.AtomicInteger, javax.management.MBeanNotificationInfo, .MBeanRegistration, .MBeanServer, .Notification, .NotificationBroadcasterSupport, .NotificationListener, .ObjectName, org.apache.juli.logging.Log, .LogFactory, org.apache.tomcat.jdbc.pool.PoolConfiguration, .PoolProperties.InterceptorDefinition, .PoolUtilities, .Validator

Field Summary

Modifier and TypeField and Description
public static final String
protected ConcurrentLinkedQueue<NotificationListener>
listeners

Listeners that are local and interested in our notifications, no need for JMX

private static final Log
log

logger

public static final String
public static final String
public static final String
private ObjectName
oname

the ObjectName of this pool.

protected ConnectionPool
pool

the connection pool

public static final String
protected AtomicInteger
sequence

sequence for JMX notifications

public static final String
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public int
getAbandonWhenPercentageFull()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getAbandonWhenPercentageFull.

Connections that have been abandoned (timed out) wont get closed and reported up unless the number of connections in use are above the percentage defined by abandonWhenPercentageFull.

public int
public long
public boolean
public String
getConnectionProperties()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getConnectionProperties.

The connection properties that will be sent to the JDBC driver when establishing new connections.

public long
public Object
getDataSource()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getDataSource.

Returns a datasource, if one exists that is being used to create connections.

public String
getDataSourceJNDI()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getDataSourceJNDI.

Returns the JNDI string configured for data source usage.

public Properties
getDbProperties()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getDbProperties.

Returns the database properties that are passed into the java.sql.Driver#connect(String, Properties) method.

public Boolean
getDefaultAutoCommit()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getDefaultAutoCommit.

The default auto-commit state of connections created by this pool.

public String
getDefaultCatalog()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getDefaultCatalog.

If non null, during connection creation the method java.sql.Connection#setCatalog(String) will be called with the set value.

public static MBeanNotificationInfo[]
public Boolean
getDefaultReadOnly()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getDefaultReadOnly.

If non null, during connection creation the method java.sql.Connection#setReadOnly(boolean) will be called with the set value.

public int
public String
getDriverClassName()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getDriverClassName.

The fully qualified Java class name of the JDBC driver to be used.

public int
public int
getInitialSize()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getInitialSize.

Returns the number of connections that will be established when the connection pool is started.

public String
getInitSQL()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getInitSQL.

A custom query to be run when a connection is first created.

public String
public PoolProperties.InterceptorDefinition[]
getJdbcInterceptorsAsArray()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getJdbcInterceptorsAsArray.

Returns the getJdbcInterceptors() as an array of objects with properties and the classes.

public boolean
getLogValidationErrors()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getLogValidationErrors.

Returns true if errors that happen during validation will be logged

public int
getMaxActive()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getMaxActive.

The maximum number of active connections that can be allocated from this pool at the same time.

public long
getMaxAge()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getMaxAge.

Time in milliseconds to keep this connection before reconnecting.

public int
getMaxIdle()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getMaxIdle.

The maximum number of connections that should be kept in the idle pool if isPoolSweeperEnabled() returns false.

public int
getMaxWait()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getMaxWait.

The maximum number of milliseconds that the pool will wait (when there are no available connections and the getMaxActive has been reached) for a connection to be returned before throwing an exception.

public int
getMinEvictableIdleTimeMillis()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getMinEvictableIdleTimeMillis.

The minimum amount of time an object must sit idle in the pool before it is eligible for eviction.

public int
getMinIdle()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getMinIdle.

The minimum number of established connections that should be kept in the pool at all times.

public String
getName()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getName.

Returns the name of the connection pool.

public MBeanNotificationInfo[]
getNotificationInfo()

Overrides javax.management.NotificationBroadcasterSupport.getNotificationInfo.

Implements javax.management.NotificationBroadcaster.getNotificationInfo.

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

public int
public int
public int
public ObjectName
public String

Returns:

DOES NOT RETURN THE PASSWORD, IT WOULD SHOW UP IN JMX
getPassword
()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getPassword.

Returns the password used when establishing connections to the database.

public ConnectionPool
public String
public PoolConfiguration
public boolean
getPropagateInterruptState()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getPropagateInterruptState.

Returns true if the pool is configured to propagate interrupt state of a thread.

public long
public long
public long
public long
public int
getRemoveAbandonedTimeout()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getRemoveAbandonedTimeout.

The time in seconds before a connection can be considered abandoned.

public long
public boolean
public int
public int
getSuspectTimeout()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getSuspectTimeout.

Returns the time in seconds to pass before a connection is marked an abandoned suspect.

public int
getTimeBetweenEvictionRunsMillis()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getTimeBetweenEvictionRunsMillis.

The number of milliseconds to sleep between runs of the idle connection validation, abandoned cleaner and idle pool resizing.

public String
getUrl()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getUrl.

The URL used to connect to the database

public boolean
getUseDisposableConnectionFacade()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getUseDisposableConnectionFacade.

Returns true if this connection pool is configured to use a connection facade to prevent re-use of connection after java.sql.Connection#close() has been invoked

public boolean
getUseLock()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getUseLock.

Return true if a lock should be used when operations are performed on the connection object.

public String
getUsername()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getUsername.

Returns the username used to establish the connection with

public boolean
getUseStatementFacade()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getUseStatementFacade.

Returns true if this connection pool is configured to wrap statements in order to enable equals() and hashCode() methods to be called on the closed statements if any statement proxy is set.

public long
getValidationInterval()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getValidationInterval.

avoid excess validation, only run validation at most at this frequency - time in milliseconds.

public String
getValidationQuery()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getValidationQuery.

The SQL query that will be used to validate connections from this pool before returning them to the caller or pool.

public int
getValidationQueryTimeout()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getValidationQueryTimeout.

The timeout in seconds before a connection validation queries fail.

public Validator
public String
getValidatorClassName()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.getValidatorClassName.

Return the name of the optional validator class - may be null.

public int
public boolean
public boolean
public Boolean
isDefaultAutoCommit()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isDefaultAutoCommit.

The default auto-commit state of connections created by this pool.

public Boolean
isDefaultReadOnly()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isDefaultReadOnly.

If non null, during connection creation the method java.sql.Connection#setReadOnly(boolean) will be called with the set value.

public boolean
isFairQueue()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isFairQueue.

Returns true if a fair queue is being used by the connection pool

public boolean
public boolean
isJmxEnabled()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isJmxEnabled.

If set to true, the connection pool creates a org.apache.tomcat.jdbc.pool.jmx.ConnectionPoolMBean object that can be registered with JMX to receive notifications and state about the pool.

public boolean
isLogAbandoned()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isLogAbandoned.

boolean flag to set if stack traces should be logged for application code which abandoned a Connection.

public boolean
isPoolSweeperEnabled()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isPoolSweeperEnabled.

Returns true if the pool sweeper is enabled for the connection pool.

public boolean
isRemoveAbandoned()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isRemoveAbandoned.

boolean flag to remove abandoned connections if they exceed the removeAbandonedTimeout.

public boolean
isTestOnBorrow()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isTestOnBorrow.

The indication of whether objects will be validated before being borrowed from the pool.

public boolean
isTestOnConnect()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isTestOnConnect.

Returns true if we should run the validation query when connecting to the database for the first time on a connection.

public boolean
isTestOnReturn()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isTestOnReturn.

The indication of whether objects will be validated after being returned to the pool.

public boolean
isTestWhileIdle()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isTestWhileIdle.

Set to true if query validation should take place while the connection is idle.

public boolean
isUseEquals()

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.isUseEquals.

Set to true if you wish the ProxyConnection class to use String.equals instead of == when comparing method names.

public boolean

Returns:

true if the notification succeeded
notify
(final String
The notification type
type
,
String
The message
message
)

Return true if the notification was sent successfully, false otherwise.

private void
poolCleanerAttributeUpdated(boolean
whether the pool cleaner was enabled before the configuration change occurred.
wasEnabled
)

Starts/stops pool cleaner thread as necessary after its configuration properties were updated.

public void
postDeregister()

Implements javax.management.MBeanRegistration.postDeregister.

Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

public void
postRegister(Boolean
Indicates whether or not the MBean has been successfully registered in the MBean server. The value false means that the registration phase has failed.
registrationDone
)

Implements javax.management.MBeanRegistration.postRegister.

Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

public void
preDeregister()

Implements javax.management.MBeanRegistration.preDeregister.

Allows the MBean to perform any operations it needs before being unregistered by the MBean server.

public ObjectName
preRegister(MBeanServer
The MBean Server in which the MBean will be registered.
server
,
ObjectName
The object name of the MBean. This name is null if the name parameter to one of the createMBean or registerMBean methods in the MBeanServer interface is null. In that case, this method must return a non-null ObjectName for the new MBean.
name
)

Implements javax.management.MBeanRegistration.preRegister.

Allows the MBean to perform any operations it needs before being registered in the MBean Server.

public void
purge()

Implements org.apache.tomcat.jdbc.pool.jmx.ConnectionPoolMBean.purge.

Purges all connections in the pool.

public void
purgeOnReturn()

Implements org.apache.tomcat.jdbc.pool.jmx.ConnectionPoolMBean.purgeOnReturn.

Purges connections when they are returned from the pool.

public boolean
public void
resetStats()

Implements org.apache.tomcat.jdbc.pool.jmx.ConnectionPoolMBean.resetStats.

reset the statistics of this pool.

public void
setAbandonWhenPercentageFull(int
a value between 0 and 100 to indicate when connections that have been abandoned/timed out are considered abandoned
percentage
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setAbandonWhenPercentageFull.

Connections that have been abandoned (timed out) wont get closed and reported up unless the number of connections in use are above the percentage defined by abandonWhenPercentageFull.

public void
public void
setAlternateUsernameAllowed(boolean
- set true if getConnection(username,password) is honored, false if it is to be ignored.
alternateUsernameAllowed
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setAlternateUsernameAllowed.

Set to true if the call getConnection(username,password) is allowed and honored..

public void
setCommitOnReturn(boolean
set to true if the pool should call java.sql.Connection#commit() when a connection is returned to the pool. Default is false
commitOnReturn
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setCommitOnReturn.

Set to true if you want the connection pool to commit any pending transaction when a connection is returned.

public void
setConnectionProperties(String
properties - Format of the string is [propertyName=property;]* Example: prop1=value1;prop2=value2
connectionProperties
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setConnectionProperties.

The properties that will be passed into java.sql.Driver#connect(String, Properties) method.

public void
setDataSource(Object
the javax.sql.DataSource to be used for creating connections to be pooled.
ds
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setDataSource.

Injects a datasource that will be used to retrieve/create connections.

public void
setDataSourceJNDI(String
-the JNDI string @TODO specify the rules here.
jndiDS
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setDataSourceJNDI.

Configure the connection pool to use a DataSource according to PoolConfiguration#setDataSource(Object) But instead of injecting the object, specify the JNDI location.

public void
setDbProperties(Properties
The database properties
dbProperties
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setDbProperties.

Overrides the database properties passed into the java.sql.Driver#connect(String, Properties) method.

public void
setDefaultAutoCommit(Boolean
default auto commit setting, null is Driver default.
defaultAutoCommit
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setDefaultAutoCommit.

The default auto-commit state of connections created by this pool.

public void
setDefaultCatalog(String
null if not set and accepting the driver default.
defaultCatalog
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setDefaultCatalog.

If non null, during connection creation the method java.sql.Connection#setCatalog(String) will be called with the set value.

public void
setDefaultReadOnly(Boolean
null if not set and accepting the driver default.
defaultReadOnly
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setDefaultReadOnly.

If non null, during connection creation the method java.sql.Connection#setReadOnly(boolean) will be called with the set value.

public void
public void
setDriverClassName(String
a fully qualified Java class name of a java.sql.Driver implementation.
driverClassName
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setDriverClassName.

The fully qualified Java class name of the JDBC driver to be used.

public void
setFairQueue(boolean
true to use a fair queue
fairQueue
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setFairQueue.

Set to true if you wish that calls to getConnection should be treated fairly in a true FIFO fashion.

public void
setIgnoreExceptionOnPreLoad(boolean
set to true if you want to ignore error of connection creation while initializing the pool.
ignoreExceptionOnPreLoad
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setIgnoreExceptionOnPreLoad.

Set to true if you want to ignore error of connection creation while initializing the pool.

public void
setInitialSize(int
the number of connections to be established.
initialSize
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setInitialSize.

Set the number of connections that will be established when the connection pool is started.

public void
setInitSQL(String
the init SQL used to run against the DB or null if no query should be executed
initSQL
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setInitSQL.

A custom query to be run when a connection is first created.

public void
setJdbcInterceptors(String
the interceptors that are used for connections. Example format: 'ConnectionState(useEquals=true,fast=yes);ResetAbandonedTimer'
jdbcInterceptors
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setJdbcInterceptors.

A semicolon separated list of classnames extending org.apache.tomcat.jdbc.pool.JdbcInterceptor class.

public void
setJmxEnabled(boolean
set to to if the mbean object should be created upon startup.
jmxEnabled
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setJmxEnabled.

If set to true, the connection pool creates a org.apache.tomcat.jdbc.pool.jmx.ConnectionPoolMBean object that can be registered with JMX to receive notifications and state about the pool.

public void
setLogAbandoned(boolean
set to true if stack traces should be recorded when DataSource#getConnection() is called.
logAbandoned
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setLogAbandoned.

boolean flag to set if stack traces should be logged for application code which abandoned a Connection.

public void
setLogValidationErrors(boolean
set to true to log validation errors
logValidationErrors
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setLogValidationErrors.

Set to true if you wish that errors from validation should be logged as error messages.

public void
setMaxActive(int
hard limit for number of managed connections by this pool
maxActive
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setMaxActive.

The maximum number of active connections that can be allocated from this pool at the same time.

public void
setMaxAge(long
the time in milliseconds a connection will be open for when used
maxAge
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setMaxAge.

Time in milliseconds to keep this connection before reconnecting.

public void
setMaxIdle(int
the maximum size of the idle pool
maxIdle
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setMaxIdle.

The maximum number of connections that should be kept in the idle pool if isPoolSweeperEnabled() returns false.

public void
setMaxWait(int
the maximum number of milliseconds to wait.
maxWait
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setMaxWait.

The maximum number of milliseconds that the pool will wait (when there are no available connections and the getMaxActive has been reached) for a connection to be returned before throwing an exception.

public void
setMinEvictableIdleTimeMillis(int
the number of milliseconds a connection must be idle to be eligible for eviction.
minEvictableIdleTimeMillis
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setMinEvictableIdleTimeMillis.

The minimum amount of time an object must sit idle in the pool before it is eligible for eviction.

public void
setMinIdle(int
the minimum number of idle or established connections
minIdle
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setMinIdle.

The minimum number of established connections that should be kept in the pool at all times.

public void
setName(String
the name of the pool, should be unique in a runtime JVM
name
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setName.

Sets the name of the connection pool

public void
setNumTestsPerEvictionRun(int
parameter ignored.
numTestsPerEvictionRun
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setNumTestsPerEvictionRun.

Property not used

public void
setPassword(String
The password
password
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setPassword.

Sets the password to establish the connection with.

public void
setPropagateInterruptState(boolean
- set to true to not clear, but propagate, a threads interrupted state.
propagateInterruptState
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setPropagateInterruptState.

Configure the pool to propagate interrupt state for interrupted threads waiting for a connection A thread waiting for a connection, can have its wait interrupted, and by default will clear the interrupt flag and throw a PoolExhaustedException If set to true, this behavior will change, while the PoolExhaustedException is still thrown, the threads interrupted state is still set.

public void
setRemoveAbandoned(boolean
set to true if abandoned connections can be closed and expelled out of the pool
removeAbandoned
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setRemoveAbandoned.

boolean flag to remove abandoned connections if they exceed the removeAbandonedTimeout.

public void
setRemoveAbandonedTimeout(int
the time in seconds before a used connection can be considered abandoned
removeAbandonedTimeout
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setRemoveAbandonedTimeout.

The time in seconds before a connection can be considered abandoned.

public void
setRollbackOnReturn(boolean
set to true if the pool should call java.sql.Connection#rollback() when a connection is returned to the pool. Default is false
rollbackOnReturn
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setRollbackOnReturn.

Set to true if you want the connection pool to rollback any pending transaction when a connection is returned.

public void
setSuspectTimeout(int
- the amount of time in seconds that has to pass before a connection is marked suspect.
seconds
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setSuspectTimeout.

Similar to setRemoveAbandonedTimeout(int) but instead of treating the connection as abandoned, and potentially closing the connection, this simply logs the warning if isLogAbandoned() returns true.

public void
setTestOnBorrow(boolean
set to true if validation should take place before a connection is handed out to the application
testOnBorrow
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setTestOnBorrow.

The indication of whether objects will be validated before being borrowed from the pool.

public void
setTestOnConnect(boolean
set to true if we should run the validation query upon connect
testOnConnect
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setTestOnConnect.

Set to true if we should run the validation query when connecting to the database for the first time on a connection.

public void
setTestOnReturn(boolean
true if validation should take place after a connection is returned to the pool
testOnReturn
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setTestOnReturn.

The indication of whether objects will be validated after being returned to the pool.

public void
setTestWhileIdle(boolean
true if validation should take place during idle checks
testWhileIdle
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setTestWhileIdle.

Set to true if query validation should take place while the connection is idle.

public void
setTimeBetweenEvictionRunsMillis(int
the sleep time in between validations in milliseconds
timeBetweenEvictionRunsMillis
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setTimeBetweenEvictionRunsMillis.

The number of milliseconds to sleep between runs of the idle connection validation, abandoned cleaner and idle pool resizing.

public void
setUrl(String
the configured URL for this connection pool
url
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setUrl.

Sets the URL used to connect to the database

public void
setUseDisposableConnectionFacade(boolean
true to use a facade
useDisposableConnectionFacade
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setUseDisposableConnectionFacade.

If set to true, the connection will be wrapped with facade that will disallow the connection to be used after java.sql.Connection#close() is called.

public void
setUseEquals(boolean
set to true if the pool should use String#equals(Object) instead of == when comparing method names on java.sql.Connection methods
useEquals
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setUseEquals.

Set to true if you wish the ProxyConnection class to use String.equals instead of == when comparing method names.

public void
setUseLock(boolean
set to true if a lock should be used on connection operations
useLock
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setUseLock.

Set to true if a lock should be used when operations are performed on the connection object.

public void
setUsername(String
The user name
username
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setUsername.

Sets the username used to establish the connection with It will also be a property called 'user' in the database properties.

public void
setUseStatementFacade(boolean
set to true to wrap statements
useStatementFacade
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setUseStatementFacade.

Set this to true if you wish to wrap statements in order to enable equals() and hashCode() methods to be called on the closed statements if any statement proxy is set.

public void
setValidationInterval(long
the validation interval in milliseconds
validationInterval
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setValidationInterval.

avoid excess validation, only run validation at most at this frequency - time in milliseconds.

public void
setValidationQuery(String
the query used for validation or null if no validation is performed
validationQuery
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setValidationQuery.

The SQL query that will be used to validate connections from this pool before returning them to the caller or pool.

public void
setValidationQueryTimeout(int
The timeout value
validationQueryTimeout
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setValidationQueryTimeout.

The timeout in seconds before a connection validation queries fail.

public void
setValidator(Validator
The validator object
validator
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setValidator.

Sets the validator object If this is a non null object, it will be used as a validator instead of the validationQuery If this is null, remove the usage of the validator.

public void
setValidatorClassName(String
the name of the optional validator class
className
)

Implements org.apache.tomcat.jdbc.pool.PoolConfiguration.setValidatorClassName.

Set the name for an optional validator class which will be used in place of test queries.

public void
Inherited from javax.management.NotificationBroadcasterSupport:
addNotificationListenerhandleNotificationremoveNotificationListenerremoveNotificationListenersendNotification