To clarify my question further:
I have a spring xml file with camel routes. I want to bootstrap this route in a BundleActivator. What are the steps in the OSGI world to initialize and start a SpringContext and register with OSGI registry. I want to do this custom through the api – need to control this rather than use the spring DM. I under stand that I need to use the OSGI classes. Any examples to follow:
This does not start the routes:
ConfigurableApplicationContext ctx = new GenericApplicationContext();
ConfigurableEnvironment environment = ctx.getEnvironment();
//set up the props for the context
XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader((BeanDefinitionRegistry) ctx);
ClassPathResource classPathResource = new ClassPathResource("context.xml",properClassLoader );
xmlReader.loadBeanDefinitions(classPathResource);
ctx.refresh();
ctx.start();
Thanks.