camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A577127 <antoine.mat...@worldline.com>
Subject Camel-jdbc : can't get useHeadersAsParameters working properly
Date Wed, 30 Jul 2014 08:52:48 GMT
Hi,

I'm trying to send a mysql request thanks to camel-jdbc. However, one of my
fields is a byteArray, so I would like to use named parameters to bind some
value to a header (which can be a byteArray).

According to the  camel-jdbc documentation
<http://camel.apache.org/jdbc.html>  , I should set "useHeadersAsParameters"
to true on my endpoint.
Then, according to the example given in the documentation :

I should set headers and reference them with the syntax ":?headername". I
tryed this, but in the end it is replaced by "?" in my request.

Then, the doc states about the "CamelJdbcParameters" header :
/A java.util.Map which has the headers to be used if useHeadersAsParameters
has been enabled./

I tryed this also (I created a HashMap<String, Object> containing a dummy
String value), and got the same problem : it is replaced by "?" in the
query.

I will take a look at how stuff gets processed in the camel-jdbc component,
but maybe I'm doing something wrong. Thanks.

(by the way, there's a typo "CamelJdbcParametes")

Here is the query I used :





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-jdbc-can-t-get-useHeadersAsParameters-working-properly-tp5754625.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message