final String configKey = MondrianDataFactoryModule.DATASOURCE_WRITER_PREFIX + connectionProvider.getClass().getName();
final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
final String value = globalConfig.getConfigProperty(configKey);
if (value == null)
{
throw new ReportWriterException("Unable to locate writer for " + connectionProvider.getClass().getName());
}
final DataSourceProviderWriteHandler handler = ObjectUtilities.loadAndInstantiate
(value, AbstractMDXDataFactoryWriteHandler.class, DataSourceProviderWriteHandler.class);
if (handler == null)
{
throw new ReportWriterException("Invalid handler for " + connectionProvider.getClass().getName());
}
handler.write(context, xmlWriter, connectionProvider);
}