Probably not directly but we could publish a service that serves the
context. I am not sure if serving the context is a good idea though as
it promotes an
ugly style. It is like directly accessing a spring context. We should
give this some thoughts before starting. But Charles could already do
this in his project for the mean
time.
Greetings
Christian
Am 29.06.2010 08:00, schrieb Charles Moulliard:
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
--
----
http://www.liquid-reality.de