public static MondrianModel instance(String filers,URL url, Config cfg, IEngUserProfile profile) throws SAXException, IOException {
if (logger.isInfoEnabled()) {
logger.info(cfg.toString());
logger.info("ConnectString=" + makeConnectString(filers,cfg, profile));
}
MondrianModel mm = (MondrianModel) ModelFactory.instance(url);
mm.setMdxQuery(cfg.getMdxQuery());
mm.setConnectString(makeConnectString(filers,cfg, profile));
mm.setJdbcDriver(cfg.getJdbcDriver());
mm.setDynresolver(cfg.getDynResolver());
mm.setDynLocale(cfg.getDynLocale());
mm.setDataSourceChangeListener( cfg.getDataSourceChangeListener());
if ("false".equalsIgnoreCase(cfg.getConnectionPooling()))
mm.setConnectionPooling(false);
mm.setExternalDataSource(cfg.getExternalDataSource());
return mm;
}