camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From techybolek <>
Subject Camel OSGI: how do I get the spring application context?
Date Thu, 15 May 2014 02:04:41 GMT
Below is a snippet from the camle-osgi example. I can obtain the camel
context but how do I get the original spring application context? Or how am
I supposed to get a reference to "mybean"?

    public class MyRouteBuilder extends RouteBuilder {
      public static void main(String[] args) throws Exception{
        new Main().run(args);

      public void configure() {
        // set up the transform bean
        ModelCamelContext mc = getContext();//ok, I can get the camel
context fine
        //but how to get the spring context to get to "mybean"???
        //set up routes


     <camel:camelContext xmlns="">

     <bean id="mybean" class="myclass"/>


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message