InputStream in = bundleContext.getBundle().getResource(ResourceConfigReader.CONFIG_FILE).openStream();
ClassLoader tccl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(new BundleClassLoader(bundleContext.getBundle()));
ResourceConfig config;
try {
config = new ResourceConfigReader(new BundleClassLoader(bundleContext.getBundle())).parse(in);
} finally {
Thread.currentThread().setContextClassLoader(tccl);
}
ConfigService configService = new ConfigServiceImpl(config);