@Override
    public Connection getConnection(String dbDsn) {
        if (StringUtils.isEmpty(dbDsn)) {
            throw new IllegalArgumentException("Invalid db dsn " + dbDsn);
        }
        logger.log(Level.INFO, "Fetching datasource for dsn %s", dbDsn);
        PooledDataSource dsP = (PooledDataSource) conCache.get(dbDsn);
        if (dsP == null) {
            try {
                dsP = (PooledDataSource) DataSources.pooledDataSource(DataSources.unpooledDataSource(dbDsn));
            }
            catch (SQLException e) {
                throw new CoreException("Unable to get db connection to " + dbDsn + "", e);
            }
            conCache.put(dbDsn, dsP);
        }
        try {
            return dsP.getConnection();
        }
        catch (SQLException e) {
            throw new CoreException("Unable to get db connection to " + dbDsn + "", e);
        }
    }