camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <bcanh...@googlemail.com>
Subject Re: ProducerTemplate without using Spring
Date Mon, 16 Sep 2013 11:24:58 GMT
Hi again,

still looking for a way on how to solve this,
what is the best way of registering a Single ProducerTemplate without using
Spring?
Cause right now I still use the way of creating a producer Template every
time I need to communicate with
a Camel Route which sooner or later results in a issue which I did describe
at [1].

Thanks and regards, Achim

[1] - https://issues.apache.org/jira/browse/CAMEL-6695


2013/9/11 Achim Nierbeck <bcanhome@googlemail.com>

> Hi there,
>
> I have a interesting setup right now using the ProducerTemplate.
>
> I found the following:
>
> http://camel.apache.org/why-does-camel-use-too-many-threads-with-producertemplate.html
> on how to add a global usable ProducerTemplate as your not supposed to
> recreate the Producer template within every Process that needs to
> communicate with a camel route.
> Now I'm not able to use spring and therefore I'm looking for a way to
> register a reusable ProducerTemplate so I'm able to access it via the
> following in my CustomBeans.
> ProducerTemplate template = context.getRegistry().lookup("template",
> ProducerTemplate.class);
> where context is the camel-Context.
> Injection doesn't work for me as I'm calling this within EJBs, and worse I
> needed to lookup the camel-context via jndi beforehand.
>
> regards, Achim
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
> Commiter & Project Lead
> blog <http://notizblog.nierbeck.de/>
>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message