| |
|
| java.lang.Object uk.org.primrose.pool.core.PoolConfigImpl uk.org.primrose.pool.core.PoolData uk.org.primrose.pool.core.Pool
Constructor Summary | |
public | Pool() |
Pool | public Pool()(Code) | | CTOR - init some stuff
|
cutbackFromFailoverPool | public void cutbackFromFailoverPool()(Code) | | |
getConnection | final public Connection getConnection() throws PoolException(Code) | | Get a pooled connection.
If the db is down, or all connections in the pool are busy,
then wait until we can find a connection ...
unless 1) queueConnectionRequests is false,
or 2) waitForConnectionIfDatabaseIsDown is false
whereupon we error, and the client will see a SQLException from
the data source object linked to this pool
|
notifyExceptionEvent | protected void notifyExceptionEvent()(Code) | | If a SQLException occurs and the parameter 'dumpConnectionOnSQLException' is true (default)
then this method is called.
If the config requires emails to be sent on SQLExceptions, then send it.
If we require notification of a possible DB crash, then see if we have, using the
'onExceptionCheckSQL' parameter SQL.
If the config requires failover, then attempt that (if the db has crashed).
|
restart | final public void restart(boolean forceStop) throws PoolException(Code) | | Restart the pool, calling stop(), then start()
|
setConnectionDefaults | final protected void setConnectionDefaults(ConnectionHolder ch, long id) throws PoolException(Code) | | Apply default connection properties to the connection
Called from fill() when a brand new connection is added to the pool,
and from put() when a connection is returned to the pool
If the check methods fail (SQLException), the underlying connection will be closed down,
and removed from the pool list
|
start | final public void start() throws PoolException(Code) | | Start the pool, filling it with the configured base of connections
|
stop | final public void stop(boolean force) throws PoolException(Code) | | Close down all connection objects, and remove them from the connection list
If force is true, then close the connection down immediately, else
leave them to finish their job, and then close them. This means that pools can
be stopped/started with no impact on live connections (ie safely).
|
|
|
|