Hi, I don't get it, can you please share a snippet of how to accomplish that.
Thanks, Nitesh On 3:20PM, Sun, 21 Dec 2014 ksobkowiak [via ServiceMix] < [email protected]> wrote: > Hi > > If you are in a Spring bean, you can just inject the CamelContext or the > ProducerTemplate into the Spring bean without retrieving the using > ApplicationContext. > > Regards > Krzysztof > > On 21.12.2014 06:50, niteshjain132 wrote: > > > Context.xml is in the same bundle, > > how can i access the beans without loading via ApplicationContext. > > > > i'm trying this - > > > > ApplicationContext ac = new > > ClassPathXmlApplicationContext("META-INF/spring/camel_spring-ws.xml"); > > CamelContext context = ac.getBean("camel",CamelContext.class); > > > > Exchange myExchange = new DefaultExchange(context); > > exchange.getIn().setBody("Hello"); > > > > ProducerTemplate template = context.createProducerTemplate(); > > template.send("direct:start", myExchange); > > > > to invoke a router defined in camelContext.xml > > > > > > > > -- > > View this message in context: > http://servicemix.396122.n5.nabble.com/The-XML-doesn-t-validates-in-ServiceMix-tp5721993p5722010.html > > > Sent from the ServiceMix - Dev mailing list archive at Nabble.com. > > > -- > Krzysztof Sobkowiak > > JEE & OSS Architect | Senior Solution Architect @ Capgemini | Committer > @ ASF > Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center > <http://www.pl.capgemini-sdm.com/> | Wroclaw > e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node&node=5722012&i=0> <mailto:[hidden > email] <http:///user/SendEmail.jtp?type=node&node=5722012&i=1>> | > Twitter: @KSobkowiak > Calendar: http://goo.gl/yvsebC > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://servicemix.396122.n5.nabble.com/The-XML-doesn-t-validates-in-ServiceMix-tp5721993p5722012.html > To unsubscribe from The XML doesn't validates in ServiceMix, click here > <http://servicemix.396122.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5721993&code=bml0ZXNoamFpbjEzMkBnbWFpbC5jb218NTcyMTk5M3wxNTcxMDAyOTM2> > . > NAML > <http://servicemix.396122.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://servicemix.396122.n5.nabble.com/The-XML-doesn-t-validates-in-ServiceMix-tp5721993p5722013.html Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
