Can we export a camelContext (from one bundle) by exposing it as a OSGI service using <osgi:reference> ?
On Tue, Jun 29, 2010 at 1:56 AM, Willem Jiang <[email protected]> wrote: > Hi Charles, > > Both solutions are OK if you can get the SpringCamelContext for your bundle > utility. > And the option 1 is easy to understand :) > > Willem > ---------------------------------- > Apache Camel, Apache CXF committer > Open SOA http://www.fusesource.com > Blog http://willemjiang.blogspot.com > Tiwtter http://twitter.com/willemjiang > > Charles Moulliard wrote: >> >> Hi, >> >> I have two bundles, one playing the role of an utility package and >> another where the camel context instantiates a Camel ProducerTemplate. >> What is the best way to retrieve the ProducerTemplate from my bundle >> utility : >> >> 1) using SpringCamelContext --> SpringCamelContext camel = >> (SpringCamelContext) ac.getBean("producerTemplate"); >> 2) using @ProducerTemplate + ref to the bean object --> >> @ProducerTemplate(ref="producerTemplate"); >> 3) ... >> >> Kind regards, >> >> Charles Moulliard >> >> Senior Enterprise Architect (J2EE, .NET, SOA) >> Apache Camel - ServiceMix Committer >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Blog : http://cmoulliard.blogspot.com | Twitter : >> http://twitter.com/cmoulliard >> Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard >> > >
