/** * Returns the name of the default database connection pool.<p> * * @return the name of the default database connection pool */ public String getDefaultDbPoolName() { return CmsDbPool.getDefaultDbPoolName(); }
/** * Returns a list of available database connection pool names.<p> * * @return a list of database connection pool names */ public List getDbPoolUrls() { return CmsDbPool.getDbPoolUrls(m_driverManager.getPropertyConfiguration()); }
/** * Returns a list of available database pool names.<p> * * @param configuration the configuration to read the pool names from * * @return a list of database pool names */ public static List<String> getDbPoolUrls(CmsParameterConfiguration configuration) { List<String> dbPoolNames = new ArrayList<String>(); List<String> driverPoolNames = configuration.getList(CmsDriverManager.CONFIGURATION_DB + ".pools"); for (String driverPoolName : driverPoolNames) { dbPoolNames.add(getDbPoolName(configuration, driverPoolName)); } return dbPoolNames; }
/** * Method to create a new instance of a pool.<p> * * @param configuration the configurations from the propertyfile * @param poolName the configuration name of the pool * * @throws CmsInitException if the pools could not be initialized */ public void newPoolInstance(CmsParameterConfiguration configuration, String poolName) throws CmsInitException { PoolingDriver driver; try { driver = CmsDbPool.createDriverManagerConnectionPool(configuration, poolName); } catch (Exception e) { CmsMessageContainer message = Messages.get().container(Messages.ERR_INIT_CONN_POOL_1, poolName); if (LOG.isErrorEnabled()) { LOG.error(message.key(), e); } throw new CmsInitException(message, e); } m_connectionPools.add(driver); }
/** * Returns a list of available database connection pool names.<p> * * @return a list of database connection pool names */ public List<String> getDbPoolUrls() { return CmsDbPool.getDbPoolUrls(m_driverManager.getPropertyConfiguration()); }
/** * Returns a list of available database pool names.<p> * * @param configuration the configuration to read the pool names from * * @return a list of database pool names */ public static List getDbPoolUrls(ExtendedProperties configuration) { List dbPoolNames = new ArrayList(); String[] driverPoolNames = configuration.getStringArray(CmsDriverManager.CONFIGURATION_DB + ".pools"); for (int i = 0; i < driverPoolNames.length; i++) { dbPoolNames.add(getDbPoolName(configuration, driverPoolNames[i])); } return dbPoolNames; }
/** * Method to create a new instance of a pool.<p> * * @param configuration the configurations from the propertyfile * @param poolName the configuration name of the pool * * @throws CmsInitException if the pools could not be initialized */ public void newPoolInstance(Map configuration, String poolName) throws CmsInitException { PoolingDriver driver; try { driver = CmsDbPool.createDriverManagerConnectionPool(configuration, poolName); } catch (Exception e) { CmsMessageContainer message = Messages.get().container(Messages.ERR_INIT_CONN_POOL_1, poolName); if (LOG.isErrorEnabled()) { LOG.error(message.key(), e); } throw new CmsInitException(message, e); } m_connectionPools.add(driver); }
/** * Returns the name of the default database connection pool.<p> * * @return the name of the default database connection pool */ public String getDefaultDbPoolName() { return CmsDbPool.getDefaultDbPoolName(); }