public class ResourceLimitingJdbcConnectionPool
extends org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool
| Modifier and Type | Field and Description |
|---|---|
private boolean |
m_autoCommit |
DEFAULT_INSTRUMENTABLE_NAME, INSTRUMENT_BLOCKS_NAME, INSTRUMENT_CREATES_NAME, INSTRUMENT_DECOMMISSIONS_NAME, INSTRUMENT_GETS_NAME, INSTRUMENT_PUTS_NAME, INSTRUMENT_READY_SIZE_NAME, INSTRUMENT_SIZE_NAME, m_semaphore| Constructor and Description |
|---|
ResourceLimitingJdbcConnectionPool(org.apache.avalon.excalibur.pool.ObjectFactory factory,
int max,
boolean maxStrict,
boolean blocking,
long blockTimeout,
long trimInterval,
boolean autoCommit)
Creates a new ResourceLimitingJdbcConnectionPool
|
ResourceLimitingJdbcConnectionPool(org.apache.avalon.excalibur.pool.ObjectFactory factory,
int max,
boolean maxStrict,
boolean blocking,
long blockTimeout,
long trimInterval,
boolean trace,
boolean autoCommit)
Creates a new ResourceLimitingJdbcConnectionPool
|
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.avalon.excalibur.pool.Poolable |
newPoolable()
Create a new poolable instance by by calling the newInstance method
on the pool's ObjectFactory.
|
protected boolean |
validatePoolable(org.apache.avalon.excalibur.pool.Poolable poolable)
Validates the poolable before it is provided to the caller of get on this pool.
|
getState, put, removePoolabledispose, getChildInstrumentables, getInstrumentableName, getInstruments, getReadySize, getSize, permanentlyRemovePoolable, setInstrumentableName, trimenableLogging, getLogger, setupLogger, setupLogger, setupLoggerpublic ResourceLimitingJdbcConnectionPool(org.apache.avalon.excalibur.pool.ObjectFactory factory,
int max,
boolean maxStrict,
boolean blocking,
long blockTimeout,
long trimInterval,
boolean trace,
boolean autoCommit)
factory - The ObjectFactory which will be used to create new connections as needed
by the pool.max - Maximum number of connections which can be stored in the pool, 0 implies
no limit.maxStrict - true if the pool should never allow more than max connections to be
created. Will cause an exception to be thrown if more than max connections are
requested and blocking is false.blocking - true if the pool should cause a thread calling get() to block when
connections are not currently available in the pool.blockTimeout - The maximum amount of time, in milliseconds, that a call to get() will
block before an exception is thrown. A value of 0 implies an indefinate wait.trimInterval - The minimum interval with which old unused connections will be removed
from the pool. A value of 0 will cause the pool to never trim old connections.trace - True if tracing of gets is enabled for the pool.autoCommit - true if connections created by this pool should have autoCommit enabled.public ResourceLimitingJdbcConnectionPool(org.apache.avalon.excalibur.pool.ObjectFactory factory,
int max,
boolean maxStrict,
boolean blocking,
long blockTimeout,
long trimInterval,
boolean autoCommit)
factory - The ObjectFactory which will be used to create new connections as needed
by the pool.max - Maximum number of connections which can be stored in the pool, 0 implies
no limit.maxStrict - true if the pool should never allow more than max connections to be
created. Will cause an exception to be thrown if more than max connections are
requested and blocking is false.blocking - true if the pool should cause a thread calling get() to block when
connections are not currently available in the pool.blockTimeout - The maximum amount of time, in milliseconds, that a call to get() will
block before an exception is thrown. A value of 0 implies an indefinate wait.trimInterval - The minimum interval with which old unused connections will be removed
from the pool. A value of 0 will cause the pool to never trim old connections.autoCommit - true if connections created by this pool should have autoCommit enabled.protected org.apache.avalon.excalibur.pool.Poolable newPoolable()
throws java.lang.Exception
newPoolable in class org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPooljava.lang.Exceptionprotected boolean validatePoolable(org.apache.avalon.excalibur.pool.Poolable poolable)
validatePoolable in class org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPoolpoolable - The Poolable to be validated