}
this.configuration = c;
} else if(configuration instanceof CompositeDataSourceConfiguration) {
CompositeDataSourceConfiguration c = (CompositeDataSourceConfiguration)configuration;
if(c.getSubConfigurations() == null || c.getSubConfigurations().size() < 1) {
throw new SpagoBIRuntimeException("Impossible to create HibernateDataSource. Datasource sub-configurations not defined");
}
for(int i = 0; i < c.getSubConfigurations().size(); i++) {
if( !(c.getSubConfigurations().get(i) instanceof FileDataSourceConfiguration) ) {
throw new SpagoBIRuntimeException("Impossible to create HibernateDataSource. Unable to manage sub-configuration of type [" + c.getSubConfigurations().get(i).getClass().getName() + "]");
}
}
this.configuration = configuration;
} else {
throw new SpagoBIRuntimeException("Impossible to create HibernateDataSource. Unable to manage configuration of type [" + configuration.getClass().getName() + "]");
}