Hi Tommy,
no, currently the camel-jdbc component (in the JdbcProducer) only
support "classic" statement:
Statement stmt = conn.createStatement();
Feel free to create a Jira to enhance the JDBC component to support
PreparedStatement.
We will pick the task and implement the new feature.
Regards
JB
On 12/27/2010 07:59 AM, Tommy Chheng 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.
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.