setThreadContextClassLoader();
CamelContextFactory factory = new CamelContextFactory();
factory.setBundleContext(bundleContext);
factory.setRegistry(createRegistry());
return factory.createContext();
}
protected void setThreadContextClassLoader() {
// set the thread context classloader current bundle classloader
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());