| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| protected ConcurrentLinkedQueue | 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 |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public int | getAbandonWhenPercentageFull()
Implements org. 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. The connection properties that will be sent to the JDBC driver when establishing new connections. |
| public long | |
| public Object | getDataSource()
Implements org. Returns a datasource, if one exists that is being used to create connections. |
| public String | getDataSourceJNDI()
Implements org. Returns the JNDI string configured for data source usage. |
| public Properties | getDbProperties()
Implements org. Returns the database properties that are passed into the |
| public Boolean | getDefaultAutoCommit()
Implements org. The default auto-commit state of connections created by this pool. |
| public String | getDefaultCatalog()
Implements org. If non null, during connection creation the method |
| public static MBeanNotificationInfo[] | |
| public Boolean | getDefaultReadOnly()
Implements org. If non null, during connection creation the method |
| public int | getDefaultTransactionIsolation()
Implements org. Returns the default transaction isolation level. |
| public String | getDriverClassName()
Implements org. The fully qualified Java class name of the JDBC driver to be used. |
| public int | |
| public int | getInitialSize()
Implements org. Returns the number of connections that will be established when the connection pool is started. |
| public String | getInitSQL()
Implements org. A custom query to be run when a connection is first created. |
| public String | getJdbcInterceptors()
Implements org. A semicolon separated list of classnames extending |
| public PoolProperties. | getJdbcInterceptorsAsArray()
Implements org. Returns the |
| public boolean | getLogValidationErrors()
Implements org. Returns true if errors that happen during validation will be logged |
| public int | getMaxActive()
Implements org. The maximum number of active connections that can be allocated from this pool at the same time. |
| public long | getMaxAge()
Implements org. Time in milliseconds to keep this connection before reconnecting. |
| public int | getMaxIdle()
Implements org. The maximum number of connections that should be kept in the idle pool if |
| public int | getMaxWait()
Implements org. The maximum number of milliseconds that the pool will wait (when there are no available connections and the
|
| public int | getMinEvictableIdleTimeMillis()
Implements org. The minimum amount of time an object must sit idle in the pool before it is eligible for eviction. |
| public int | getMinIdle()
Implements org. The minimum number of established connections that should be kept in the pool at all times. |
| public String | getName()
Implements org. Returns the name of the connection pool. |
| public MBeanNotificationInfo[] | getNotificationInfo()
Overrides javax. Implements javax. 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 | getNumTestsPerEvictionRun()
Implements org. Property not used |
| public ObjectName | |
| public String | Returns: DOES NOT RETURN THE PASSWORD, IT WOULD SHOW UP IN JMXImplements org. Returns the password used when establishing connections to the database. |
| public ConnectionPool | |
| public String | |
| public PoolConfiguration | |
| public boolean | getPropagateInterruptState()
Implements org. 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. The time in seconds before a connection can be considered abandoned. |
| public long | |
| public boolean | |
| public int | |
| public int | getSuspectTimeout()
Implements org. Returns the time in seconds to pass before a connection is marked an abandoned suspect. |
| public int | getTimeBetweenEvictionRunsMillis()
Implements org. The number of milliseconds to sleep between runs of the idle connection validation, abandoned cleaner and idle pool resizing. |
| public String | getUrl()
Implements org. The URL used to connect to the database |
| public boolean | getUseDisposableConnectionFacade()
Implements org. Returns |
| public boolean | getUseLock()
Implements org. Return true if a lock should be used when operations are performed on the connection object. |
| public String | getUsername()
Implements org. Returns the username used to establish the connection with |
| public boolean | getUseStatementFacade()
Implements org. Returns |
| public long | getValidationInterval()
Implements org. avoid excess validation, only run validation at most at this frequency - time in milliseconds. |
| public String | getValidationQuery()
Implements org. 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. The timeout in seconds before a connection validation queries fail. |
| public Validator | |
| public String | getValidatorClassName()
Implements org. Return the name of the optional validator class - may be null. |
| public int | |
| public boolean | isAccessToUnderlyingConnectionAllowed()
Implements org. Property not used. |
| public boolean | isAlternateUsernameAllowed()
Implements org. Returns true if the call |
| public Boolean | isDefaultAutoCommit()
Implements org. The default auto-commit state of connections created by this pool. |
| public Boolean | isDefaultReadOnly()
Implements org. If non null, during connection creation the method |
| public boolean | isFairQueue()
Implements org. Returns |
| public boolean | |
| public boolean | isJmxEnabled()
Implements org. If set to true, the connection pool creates a |
| public boolean | isLogAbandoned()
Implements org. boolean flag to set if stack traces should be logged for application code which abandoned a Connection. |
| public boolean | isPoolSweeperEnabled()
Implements org. Returns true if the pool sweeper is enabled for the connection pool. |
| public boolean | isRemoveAbandoned()
Implements org. boolean flag to remove abandoned connections if they exceed the removeAbandonedTimeout. |
| public boolean | isTestOnBorrow()
Implements org. The indication of whether objects will be validated before being borrowed from the pool. |
| public boolean | isTestOnConnect()
Implements org. 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. The indication of whether objects will be validated after being returned to the pool. |
| public boolean | isTestWhileIdle()
Implements org. Set to true if query validation should take place while the connection is idle. |
| public boolean | isUseEquals()
Implements org. Set to true if you wish the |
| public boolean | |
| 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. 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. 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. 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 name)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.Implements javax. Allows the MBean to perform any operations it needs before being registered in the MBean Server. |
| public void | purge()
Implements org. Purges all connections in the pool. |
| public void | purgeOnReturn()
Implements org. Purges connections when they are returned from the pool. |
| public boolean | |
| public void | resetStats()
Implements org. 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. 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 | setAccessToUnderlyingConnectionAllowed(boolean
parameter ignored accessToUnderlyingConnectionAllowed)Implements org. No-op |
| public void | setAlternateUsernameAllowed(boolean
- set true if alternateUsernameAllowed)getConnection(username,password) is honored,
false if it is to be ignored.Implements org. Set to true if the call |
| public void | setCommitOnReturn(boolean
set to true if the pool should call commitOnReturn)java. when a connection is returned to the pool.
Default is falseImplements org. 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. The properties that will be passed into |
| public void | setDataSource(Object
the ds)javax. to be used for creating connections to be pooled.Implements org. 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. Configure the connection pool to use a DataSource according to |
| public void | setDbProperties(Properties
The database properties dbProperties)Implements org. Overrides the database properties passed into the |
| public void | setDefaultAutoCommit(Boolean
default auto commit setting, null is Driver default. defaultAutoCommit)Implements org. 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. If non null, during connection creation the method |
| public void | setDefaultReadOnly(Boolean
null if not set and accepting the driver default. defaultReadOnly)Implements org. If non null, during connection creation the method |
| public void | setDefaultTransactionIsolation(int
a value of defaultTransactionIsolation)java., java.,
java., java.,
java. or DataSourceFactory#UNKNOWN_TRANSACTIONISOLATION
The last value will not be set on the connection.Implements org. If set to |
| public void | setDriverClassName(String
a fully qualified Java class name of a driverClassName)java. implementation.Implements org. The fully qualified Java class name of the JDBC driver to be used. |
| public void | setFairQueue(boolean
true to use a fair queueImplements org. 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. 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. 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. 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. A semicolon separated list of classnames extending |
| public void | setJmxEnabled(boolean
set to to if the mbean object should be created upon startup. jmxEnabled)Implements org. If set to true, the connection pool creates a |
| public void | setLogAbandoned(boolean
set to true if stack traces should be recorded when logAbandoned)DataSource#getConnection() is called.Implements org. 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. 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. 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. Time in milliseconds to keep this connection before reconnecting. |
| public void | setMaxIdle(int
the maximum size of the idle pool maxIdle)Implements org. The maximum number of connections that should be kept in the idle pool if |
| public void | setMaxWait(int
the maximum number of milliseconds to wait. maxWait)Implements org. The maximum number of milliseconds that the pool will wait (when there are no available connections and the
|
| public void | setMinEvictableIdleTimeMillis(int
the number of milliseconds a connection must be idle to be eligible for eviction. minEvictableIdleTimeMillis)Implements org. 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. 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. Sets the name of the connection pool |
| public void | setNumTestsPerEvictionRun(int
parameter ignored. numTestsPerEvictionRun)Implements org. Property not used |
| public void | setPassword(String
The password password)Implements org. 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. 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 |
| public void | setRemoveAbandoned(boolean
set to true if abandoned connections can be closed and expelled out of the pool removeAbandoned)Implements org. 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. The time in seconds before a connection can be considered abandoned. |
| public void | setRollbackOnReturn(boolean
set to true if the pool should call rollbackOnReturn)java. when a connection is returned to the pool.
Default is falseImplements org. 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. Similar to |
| public void | setTestOnBorrow(boolean
set to true if validation should take place before a connection is handed out to the application testOnBorrow)Implements org. 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. 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. 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. 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. 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. Sets the URL used to connect to the database |
| public void | setUseDisposableConnectionFacade(boolean
true to use a facadeImplements org. If set to |
| public void | setUseEquals(boolean
set to true if the pool should use useEquals)String#equals(Object) instead of ==
when comparing method names on java. methodsImplements org. Set to true if you wish the |
| public void | setUseLock(boolean
set to true if a lock should be used on connection operations useLock)Implements org. 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. 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 useStatementFacade)true to wrap statementsImplements org. 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. 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. 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. The timeout in seconds before a connection validation queries fail. |
| public void | setValidator(Validator
The validator object validator)Implements org. 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. Set the name for an optional validator class which will be used in place of test queries. |
| public void |