/** * <p>getPool.</p> * * @param name a {@link java.lang.String} object. * @return a {@link de.mhus.lib.sql.DbPool} object. * @throws java.lang.Exception if any. */ public DbPool getPool(String name) throws Exception { if (bundle == null) throw new MException("Bundle already closed"); synchronized (bundle) { DbPool pool = bundle.get(name); if (pool == null) { IConfig poolCon = config.getNode(name); if (poolCon != null) { pool = new DefaultDbPool(poolCon, activator); bundle.put(name, pool); } else { throw new MException("pool config not found",name); } } return pool; } }
protected DbPool doCreateDataPool() { return new DefaultDbPool(new DataSourceProvider(getDataSource(), doCreateDialect(), doCreateConfig(), doCreateActivator() )); }
storageDsProvider = new DataSourceProvider(); updateStorageDataSource(); storagePool = new DefaultDbPool(storageDsProvider); config.storage = new SqlDbStorage(storagePool,"storage"); archiveDsProvider = new DataSourceProvider(); updateArchiveDataSource(); archivePool = new DefaultDbPool(archiveDsProvider); config.archive = new SqlDbStorage(archivePool,"archive");