use of com.sun.appserv.connectors.internal.spi.MCFLifecycleListener in project Payara by payara.
the class PoolManagerImpl method killPool.
/**
* Kill the pool with the specified pool name
*
* @param poolInfo - The name of the pool to kill
*/
public void killPool(PoolInfo poolInfo) {
// empty the pool
// and remove from poolTable
ResourcePool pool = poolTable.get(poolInfo);
if (pool != null) {
pool.cancelResizerTask();
pool.emptyPool();
if (_logger.isLoggable(Level.FINE)) {
_logger.fine("Removing pool " + pool + " from pooltable");
}
poolTable.remove(poolInfo);
if (listener != null) {
listener.poolDestroyed(poolInfo);
}
// notify mcf-destroy
ManagedConnectionFactory mcf = ConnectorRegistry.getInstance().getManagedConnectionFactory(poolInfo);
if (mcf != null) {
if (mcf instanceof MCFLifecycleListener) {
((MCFLifecycleListener) mcf).mcfDestroyed();
}
}
}
}
use of com.sun.appserv.connectors.internal.spi.MCFLifecycleListener in project Payara by payara.
the class PoolManagerImpl method createEmptyConnectionPool.
public void createEmptyConnectionPool(PoolInfo poolInfo, PoolType pt, Hashtable env) throws PoolingException {
// Create and initialise the connection pool
createAndInitPool(poolInfo, pt, env);
if (listener != null) {
try {
listener.poolCreated(poolInfo);
} catch (Exception ex) {
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "Exception thrown on pool listener");
}
}
}
// notify mcf-create
ManagedConnectionFactory mcf = ConnectorRegistry.getInstance().getManagedConnectionFactory(poolInfo);
if (mcf != null) {
if (mcf instanceof MCFLifecycleListener) {
((MCFLifecycleListener) mcf).mcfCreated();
}
}
}
Aggregations