Hi thanks for your reply. The reason I was trying to use my own activator is
so I could run my camel-context from a camel-context.xml file that is
located external to my bundle. I want to be able to dynamically generate a
camel route in my application so it would be easiest to generate the
camel-context.xml file then load it from a location on my file system in my
bundle.
The activator is very simple right now because I was trying to see if it was
possible to use a camel-context from an external file but as I said before,
it does not get called when I start my bundle:
public class Activator implements BundleActivator {
CamelContext camContext;
private static final String CAMEL_CONTEXT_PATH =
"C:\\software\\temp\\camel-routes\\camel-context.xml";
@Override
public void start(BundleContext arg0) throws Exception {
ApplicationContext context = new
FileSystemXmlApplicationContext(CAMEL_CONTEXT_PATH);
camContext = (CamelContext) context.getBean("cotDataService");
camContext.start();
}
@Override
public void stop(BundleContext arg0) throws Exception {
camContext.stop();
}
}
Do you know whether this is possible or should I try another approach?
Thanks,
Jeff
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-Activator-OSGI-tp4422370p4425200.html
Sent from the Camel - Users mailing list archive at Nabble.com.