camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Fill cache from SQL query
Date Wed, 28 Dec 2011 09:27:44 GMT
On Tue, Dec 27, 2011 at 6:36 PM, guitarcarver
<servicemix@churchilllake.com> wrote:
> I want to extract data key/value data with an SQL query in a camel xml DSL
> file and then use it later.
>
> My thermometer reading app use case is this:
>
> 1. Once (or periodically): select thermometer,lowvalue from Thermometers
> 2. In Route A, read temperatures and put them in a topic
> 3. In Route B, in a <Choice>/<When> clause as temperatures come in from the
> topic, check if the
>    current temp is below lowvalue
> 3. Notify me
>
> I've read a lot and tried to form a google query to see if there is a
> standard way of doing this but after about 3 days of inconclusive research,
> let me ask here.
>

Why are you afraid of using java code? If you can get the job done
much faster, than spending 3 days.


> In spring-xml DSL, can I keep a set of key/value pairs that I can
> subsequently use to do a key lookup and compare the value?  And do it
> without Java?
>

You can use scripting languages in XML DSL to compare values and whatnot.
http://camel.apache.org/scripting-languages.html

> I'm using servicemix 4.4 and drop the DSL xml file into the deploy
> directory.  What a great way of keeping it simple and accurate!
>
> Thanks in advance,
> Robbin
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Fill-cache-from-SQL-query-tp5103535p5103535.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message