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: prepared statements in camel-jdbc?
Date Mon, 27 Dec 2010 08:29:35 GMT
On Mon, Dec 27, 2010 at 7:59 AM, Tommy Chheng <tommy.chheng@gmail.com> wrote:
> Is it possible to use jdbc's prepared statements with camel-jdbc?
> It's more for a matter of preventing sql injection than performance.
>

No its not possible.
However if you want to help improve camel-jdbc feel free to work on a
patch to support prepared statements.

You can use Spring JdbcTemplate which supports prepared statements.

>
> My route is using a bean to transform an xml data input into a insert statement like
this:
> from("direct:xmlInput").
> bean(classOf[xmlTransformToSql]).
> log("Received: ${body}").
> to("jdbc:test_data")
>
>
> I'm escaping the input in the bean but a prepared statement would be more secure.
>
>
>
> --
> @tommychheng
> http://tommy.chheng.com
>
>
>



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

Mime
View raw message