final String configKey = MondrianDataFactoryModule.DATASOURCE_BUNDLEWRITER_PREFIX + connectionProvider.getClass().getName();
final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
final String value = globalConfig.getConfigProperty(configKey);
if (value == null)
{
throw new BundleWriterException("Unable to locate writer for " + connectionProvider.getClass().getName());
}
final DataSourceProviderBundleWriteHandler handler =
(DataSourceProviderBundleWriteHandler) ObjectUtilities.loadAndInstantiate
(value, AbstractMDXDataFactoryBundleWriteHandler.class, DataSourceProviderBundleWriteHandler.class);
if (handler == null)
{
throw new BundleWriterException("Invalid write-handler for " + connectionProvider.getClass().getName());
}
handler.write(bundle, state, xmlWriter, connectionProvider);
}