JDBC

JDBC

Scheme: jdbc

Name Kind Type Required Deprecated Default Value Enum Values Description
dataSource path javax.sql.DataSource true false The data source to use
readSize parameter int false The default maximum number of rows that can be read by a polling query. The default value is 0.
transacted parameter boolean false Whether transactions are in use.
resetAutoCommit parameter boolean false true Camel will set the autoCommit on the JDBC connection to be false, commit the change after executed the statement and reset the autoCommit flag of the connection at the end, if the resetAutoCommit is true. If the JDBC connection doesn't support to reset the autoCommit flag, you can set the resetAutoCommit flag to be false, and Camel will not try to reset the autoCommit flag. When used with XA transactions you most likely need to set it to false so that the transaction manager is in charge of committing this tx.
useJDBC4ColumnNameAndLabelSemantics parameter boolean false true Sets whether to use JDBC 4 or JDBC 3.0 or older semantic when retrieving column name.

JDBC 4.0 uses columnLabel to get the column name where as JDBC 3.0 uses both columnName or columnLabel. Unfortunately JDBC drivers behave differently so you can use this option to work out issues around your JDBC driver if you get problem using this component

This option is default true. @param useJDBC4ColumnNameAndLabelSemantics true to use JDBC 4.0 semantics, false to use JDBC 3.0.

prepareStatementStrategy parameter org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy false Allows to plugin to use a custom org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy to control preparation of the query and prepared statement.
allowNamedParameters parameter boolean false true Whether to allow using named parameters in the queries.
useHeadersAsParameters parameter boolean false Set this option to true to use the prepareStatementStrategy with named parameters. This allows to define queries with named placeholders, and use headers with the dynamic values for the query placeholders.
outputType parameter org.apache.camel.component.jdbc.JdbcOutputType false SelectList SelectOne
SelectList
StreamList
Determines the output the producer should use.
outputClass parameter java.lang.String false Specify the full package and class name to use as conversion when outputType=SelectOne or SelectList.
beanRowMapper parameter org.apache.camel.component.jdbc.BeanRowMapper false To use a custom org.apache.camel.component.jdbc.BeanRowMapper when using outputClass. The default implementation will lower case the row names and skip underscores, and dashes. For example "CUST_ID" is mapped as "custId".
exchangePattern parameter org.apache.camel.ExchangePattern false InOnly InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange
synchronous parameter boolean false false Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).