if (ds == null) {
logger.error("The data source with id " + obj.getDataSourceId() + " is not found on the database.");
return null;
}
Domain dialectHB = DAOFactory.getDomainDAO().loadDomainById(ds.getDialectId());
if (ds == null) {
logger.error("The data source with id " + obj.getDataSourceId() + " is not found on the database.");
return null;
}
sbds = new SpagoBiDataSource();
sbds.setLabel(ds.getLabel());
sbds.setJndiName(ds.getJndi());
sbds.setUrl(ds.getUrlConnection());
sbds.setUser(ds.getUser());
sbds.setPassword(ds.getPwd());
sbds.setDriver(ds.getDriver());
sbds.setHibDialectName(dialectHB.getValueName());
//change
// sbds.setHibDialectClass(dialectHB.getValueDescription());
sbds.setHibDialectClass(dialectHB.getValueCd());
logger.info("read DS: Label="+sbds.getLabel()+" Jndi="+sbds.getJndiName()+" HIB="+sbds.getHibDialectClass());
//gets dialect informations
IDomainDAO domaindao = DAOFactory.getDomainDAO();
Domain doDialect = domaindao.loadDomainById(ds.getDialectId());
sbds.setHibDialectClass(doDialect.getValueCd());
sbds.setHibDialectName(doDialect.getValueName());
sbds.setMultiSchema(ds.getMultiSchema());
sbds.setSchemaAttribute(ds.getSchemaAttribute());
} catch (Exception e) {
logger.error("The data source is not correctly returned", e);