camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gershaw, Geoffrey A. (KFFC 223)" <geoffrey.gers...@credit-suisse.com>
Subject RE: ProducerTemplate without using Spring
Date Mon, 16 Sep 2013 14:59:45 GMT
Hi, 

Not a camel solution, but couldn't you load it once on startup of your app and keep it in
an instance controlled class or singleton?

Geoffrey A Gershaw
Credit eTrading Development
+1 919 994 6412 (*102 6412)


-----Original Message-----
From: Achim Nierbeck [mailto:bcanhome@googlemail.com] 
Sent: Monday, September 16, 2013 7:25 AM
To: users@camel.apache.org
Subject: Re: ProducerTemplate without using Spring

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/>


=============================================================================== 
Please access the attached hyperlink for an important electronic communications disclaimer:

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=============================================================================== 


Mime
View raw message