@Override protected CamelContext createCamelContext() throws Exception { setThreadContextClassLoader(); applicationContext = new OsgiBundleXmlApplicationContext( new String[] {"org/apache/camel/itest/osgi/jpa/springJpaRouteContext.xml"}); if (bundleContext != null) { applicationContext.setBundleContext(bundleContext); applicationContext.refresh(); } return SpringCamelContext.springCamelContext(applicationContext); }