/** * Flush Connection pool by reinitializing the connections * established in the pool. * @param poolInfo * @throws com.sun.appserv.connectors.internal.api.ConnectorRuntimeException */ public boolean flushConnectionPool(PoolInfo poolInfo) throws ConnectorRuntimeException { PoolManager poolMgr = _runtime.getPoolManager(); try { return poolMgr.flushConnectionPool( poolInfo ); } catch (PoolingException ex) { throw new ConnectorRuntimeException(ex.getMessage()); } }
/** * Make sure that steady pool size is maintained after all idle-timed-out, * invalid and scale-down resource removals. */ private void ensureSteadyPool() { if (ds.getResourcesSize() < pool.getSteadyPoolSize()) { // Create resources to match the steady pool size for (int i = ds.getResourcesSize(); i < pool.getSteadyPoolSize(); i++) { try { handler.createResourceAndAddToPool(); } catch (PoolingException ex) { Object[] params = new Object[]{poolInfo, ex.getMessage()}; _logger.log(Level.WARNING, "resource_pool.resize_pool_error", params); } } } }
/** * Reinitialize connections established in the connection pool and * bring the pool to steady pool size. * * @throws com.sun.appserv.connectors.internal.api.PoolingException */ public synchronized boolean flushConnectionPool() throws PoolingException { logFine("Flush Connection Pool entered"); if(!poolInitialized) { _logger.log(Level.WARNING, "poolmgr.flush_noop_pool_not_initialized", getPoolInfo()); throw new PoolingException("Flush Connection Pool failed for " + getPoolInfo() + ". Please see server.log for more details."); } try { killExtraResources(ds.getResourcesSize()); increaseSteadyPoolSize(steadyPoolSize); } catch(PoolingException ex) { _logger.log(Level.WARNING, "pool.flush_pool_failure", new Object[] {getPoolInfo(), ex.getMessage()}); throw ex; } logFine("Flush Connection Pool done"); return true; }
Object[] params = new Object[]{poolInfo, ex}; getLogger().log(Level.WARNING, "poolmgr.get_connection_failure", params); String i18nMsg = getLocalStrings().getString("con_mgr.error_creating_connection", ex.getMessage()); ResourceAllocationException rae = new ResourceAllocationException(i18nMsg); rae.initCause(ex);
poolMgr.reconfigPoolProperties(ccp); } catch (PoolingException pe) { throw new ConnectorRuntimeException(pe.getMessage());