Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D053117C39 for ; Wed, 28 Jan 2015 10:20:20 +0000 (UTC) Received: (qmail 45489 invoked by uid 500); 28 Jan 2015 10:20:21 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 45442 invoked by uid 500); 28 Jan 2015 10:20:21 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 45433 invoked by uid 99); 28 Jan 2015 10:20:21 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jan 2015 10:20:20 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id B0369AC005A for ; Wed, 28 Jan 2015 10:20:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r937984 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache jdbc.html Date: Wed, 28 Jan 2015 10:20:19 -0000 To: commits@camel.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150128102020.B0369AC005A@hades.apache.org> Author: buildbot Date: Wed Jan 28 10:20:18 2015 New Revision: 937984 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/jdbc.html Modified: websites/production/camel/content/book-component-appendix.html ============================================================================== --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Wed Jan 28 10:20:18 2015 @@ -1360,11 +1360,11 @@ template.send("direct:alias-verify&

The cxf: component provides integration with Apache CXF for connecting to JAX-WS services hosted in CXF.

+/*]]>*/

  • CXF Component
    • URI format
    • Options
      • The descriptions of the dataformats @@ -5658,7 +5658,7 @@ We store big input streams (by default,

        URI format

        -

        This component only supports producer endpoints.

        You can append query options to the URI in the following format, ?option=value&option=value&...

        Options

        Name

        Default Value

        Description

        readSize

        0

        The default maximum number of rows that can be read by a polling query. The default value is 0.

        statement.<xxx>

        null

        Camel 2.1: Sets additional options on the java.sql.Statement that is used behind the scenes to execute the queries. For instance, statement.maxRows=10. For detailed documentation, see the java.sql.Statement javadoc documentation.

        useJDBC4ColumnNameAndLabelSemantics

        true

        Camel 2.2: Sets whether to use JDBC 4/3 column label/name semantics. You can use this option to turn it false in case you have issues with your JDBC driver to select data. This only a pplies when using SQL SELECT using aliases (e.g. SQL SELECT id as identifier, name as given_name from persons).

        resetAutoCommit

        true

        Camel 2.9: 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.

        allowNamedParameters

        true

        Camel 2.12: Whether to allow using named parameters in the queries.

        prepareStatementStrategy

         

        Camel 2.12: Allows to plugin to use a custom org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy to control preparation of the query and prepared statement.

        useHeadersAsParameters

        false

        Camel 2.12: Set this option to true to use the prepareStatementStrategy with named parameters. This allows to define queries with named placeholders, and use headers with t he dynamic values for the query placeholders.

        outputType

        SelectList

        Camel 2.12.1: Make the output of the producer to SelectList as List of Map, or SelectOne as single Java object in the following way:
        a) If the query has only single column, then that JDBC Column object is returned. (such as SELECT COUNT( * ) FROM PROJECT will return a Long object.
        b) If the query has more than one column, then it will return a Map of that result.
        c) If the outputClass is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with. From Camel 2.14 onwards then SelectLi st is also supported.
        d) If the query resulted in more than one rows, it throws an non-unique result exception.
        Camel 2.14.0: New StreamList output type value that streams the result of the query using an Iterator<Map<String, Object>>, it can be used along with the Splitter EIP.

        outputClass

        null

        Camel 2.12.1: Specify the full package and class name to use as conversion when outputType=SelectOne. From Camel 2.14 onwards then SelectList is also supported.

        beanRowMapper

         60;

        Camel 2.12.1: 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".

        Result

        By default the result is returned in the OUT body as an ArrayList<HashMap<String, Object>>. The List object contains the list of rows and the Map objects contain each row with the String key as the column name. You can use the option outputType to control the result.

        Note: This component fetches ResultSetMetaData to be able to return the column name as the key in the Map.

        Message Headers

        Header

        Description

        CamelJdbcRowCount

        If the query is a SELECT, query the row count is returned in this OUT header.

        CamelJdbcUpdateCount

        If the query is an UPDATE, query the update count is returned in this OUT header.

        CamelGeneratedKeysRows

        Camel 2.10: Rows that contains the generated kets.

        CamelGeneratedKeysRowCount

        Camel 2.10: The number of rows in the header that contains generated keys.

        CamelJdbcColumnNames

        Camel 2.11.1: The column names from the ResultSet as a java.util.Set type.

        CamelJdbcParametes

        Camel 2.12: A java.util.Map which has the headers to be used if useHeadersAsParameters has been enabled.

        Generated keys

        Available as of Camel 2.10

        If you insert data using SQL INSERT, then the RDBMS may support auto generated keys. You can instruct the JDBC producer to return the generated keys in headers.
        To do that set the header CamelRetrieveGeneratedKeys=true. Then the generated keys will be provided as headers with the keys listed in the table above.

        You can see more details in this unit test.

        +

This component only supports producer endpoints.

You can append query options to the URI in the following format, ?option=value&option=value&...

Options

Name

Default Value

Description

readSize

0

The default maximum number of rows that can be read by a polling query. The default value is 0.

statement.<xxx>

null

Camel 2.1: Sets additional options on the java.sql.Statement that is used behind the scenes to execute the queries. For instance, statement.maxRows=10. For detailed documentation, see the java.sql.Statement javadoc documentation.

useJDBC4ColumnNameAndLabelSemantics

true

Camel 2.2: Sets whether to use JDBC 4/3 column label/name semantics. You can use this option to turn it false in case you have issues with your JDBC driver to select data. This only a pplies when using SQL SELECT using aliases (e.g. SQL SELECT id as identifier, name as given_name from persons).

resetAutoCommit

true

Camel 2.9: 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.

allowNamedParameters

true

Camel 2.12: Whether to allow using named parameters in the queries.

prepareStatementStrategy

 

Camel 2.12: Allows to plugin to use a custom org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy to control preparation of the query and prepared statement.

useHeadersAsParameters

false

Camel 2.12: Set this option to true< /code> 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

SelectList

Camel 2.12.1: Make the output of the producer to SelectList as List of Map, or SelectOne as single Java object in the following way:
a) If the query has only single column, then that JDBC Column object is returned. (such as SELECT COUNT( * ) FROM PROJECT will return a Long object.
b) If the query has more than one column, then it will return a Map of that result.
c) If the outputClass is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with. From Camel 2.14 onwards then SelectList is also supported.
d) If the query resulted in more than one rows, it throws an non-unique result exception.
Camel 2.14.0: New StreamList output type value that streams the result of the query using an Iterator<Map<String, Object>>, it can be used along with the Splitter EIP.

outputClass

null

Camel 2.12.1: Specify the full package and class name to use as conversion when outputType=SelectOne. From Camel 2.14 onwards then SelectList is also supported.

beanRowMapper

 

Camel 2.12.1: 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".

Result

By default the result is returned in the OUT body as an ArrayList<HashMap<String, Object>>. The List object contains the list of rows and the Map objects contain each row with the String key as the column name. You can use the option outputType to control the result.

Note: This component fetches ResultSetMetaData to be able to return the column name as the key in the Map.

Message Headers

Generated keys

Available as of Camel 2.10

If you insert data using SQL INSERT, then the RDBMS may support auto generated keys. You can instruct the JDBC producer to return the generated keys in headers.
To do that set the header CamelRetrieveGeneratedKeys=true. Then the generated keys will be provided as headers with the keys listed in the table above.

You can see more details in this unit test.

Icon

Using generated keys does not work with together with named parameters.

Modified: websites/production/camel/content/book-in-one-page.html ============================================================================== --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Wed Jan 28 10:20:18 2015 @@ -4126,11 +4126,11 @@ While not actual tutorials you might fin

Preface

This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a Spring service. The route works in a synchronous fashion returning a response to the client.

+/*]]>*/

Header

Description

CamelJdbcRowCount

If the query is a SELECT, query the row count is returned in this OUT header.

CamelJdbcUpdateCount

If the query is an UPDATE, query the update count is returned in this OUT header.

CamelGeneratedKeysRows< /code>

Camel 2.10: Rows that contains the generated kets.

CamelGeneratedKeysRowCount

Camel 2.10: The number of rows in the header that contains generated keys.

CamelJdbcColumnNames

Camel 2.11.1: The column names from the ResultSet as a java.util.Set type.

CamelJdbcParametes

Camel 2.12: A java.util.Map which has the headers to be used if useHeadersAsParameters has been enabled.

Name

Default Value

Description

readSize

0

The default maximum number of rows that can be read by a polling query. The default value is 0.

statement.<xxx>

null

Camel 2.1: Sets additional options on the java.sql.Statement that is used behind the scenes to execute the queries. For instance, statement.maxRows=10. For detailed documentation, see the java.sql.Statement javadoc documentation.

useJDBC4ColumnNameAndLabelSemantics

true

Camel 2.2: Sets whether to use JDBC 4/3 column label/name semantics. You can use this option to turn it false in case you have issues with your JDBC driver to select data. This only applies w hen using SQL SELECT using aliases (e.g. SQL SELECT id as identifier, name as given_name from persons).

resetAutoCommit

true

Camel 2.9: 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.

allowNamedParameters

true

Camel 2.12: Whether to allow using named parameters in the queries.

prepareStatementStrategy

 

Camel 2.12: Allows to plugin to use a custom org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy to control preparation of the query and prepared statement.

useHeadersAsParameters

false

Camel 2.12: 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 dynam ic values for the query placeholders.

outputType

SelectList

Camel 2.12.1: Make the output of the producer to SelectList as List of Map, or SelectOne as single Java object in the following way:
a) If the query has only single column, then that JDBC Column object is returned. (such as SELECT COUNT( * ) FROM PROJECT will return a Long object.
b) If the query has more than one column, then it will return a Map of that result.
c) If the outputClass is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with. From Camel 2.14 onwards then SelectList is al so supported.
d) If the query resulted in more than one rows, it throws an non-unique result exception.
Camel 2.14.0: New StreamList output type value that streams the result of the query using an Iterator<Map<String, Object>>, it can be used along with the Splitter EIP.

outputClass

null

Camel 2.12.1: Specify the full package and class name to use as conversion when outputType=SelectOne. From Camel 2.14 onwards then SelectList is also supported.

beanRowMapper

 

< /td>

Camel 2.12.1: 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".

Result

By default the result is returned in the OUT body as an ArrayList<HashMap<String, Object>>. The List object contains the list of rows and the Map objects contain each row with the String key as the column name. You can use the option outputType to control the result.

Note: This component fetches ResultSetMetaData to be able to return the column name as the key in the Map.

Message Headers

Header

Description

CamelJdbcRowCount

If the query is a SELECT, query the row count is returned in this OUT header.

CamelJdbcUpdateCount

If the query is an UPDATE, query the update count is returned in this OUT header.

CamelGeneratedKeysRows

Camel 2.10: Rows that contains the generated kets.

CamelGeneratedKeysRowCount

Camel 2.10: The number of rows in the header that contains generated keys.

CamelJdbcColumnNames

Camel 2.11.1: The column names from the ResultSet as a java.util.Set type.

CamelJdbcParametes

Camel 2.12: A java.util.Map which has the headers to be used if useHeadersAsParameters has been enabled.

Generated keys

Available as of Camel 2.10

If you insert data using SQL INSERT, then the RDBMS may supp ort auto generated keys. You can instruct the JDBC producer to return the generated keys in headers.
To do that set the header CamelRetrieveGeneratedKeys=true. Then the generated keys will be provided as headers with the keys listed in the table above.

You can see more details in this unit test.

+

This component only supports producer endpoints.

You can append query options to the URI in the following format, ?option=value&option=value&...

Options

Name

Default Value

Description

readSize

0

The default maximum number of rows that can be read by a polling query. The default value is 0.

statement.<xxx>

null

Camel 2.1: Sets additional options on the java.sql.Statement that is used behind the scenes to execute the queries. For instance, statement.maxRows=10. For detailed documentation, see the java.sql.Statement javadoc documentation.

useJDBC4ColumnNameAndLabelSemantics

true

Camel 2.2: Sets whether to use JDBC 4/3 column label/name semantics. You can use this option to turn it false in case you have issues with your JDBC driver to select data. This only applies w hen using SQL SELECT using aliases (e.g. SQL SELECT id as identifier, name as given_name from persons).

resetAutoCommit

true

Camel 2.9: 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.

< code>allowNamedParameters

true

Camel 2.12: Whether to allow using named parameters in the queries.

prepareStatementStrategy

 

Camel 2.12: Allows to plugin to use a custom org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy to control preparation of the query and prepared statement.

useHeadersAsParameters

false

Camel 2.12: Set this option to true t o 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

SelectList

Camel 2.12.1: Make the output of the producer to SelectList as List of Map, or SelectOne as single Java object in the following way:
a) If the query has only single column, then that JDBC Column object is returned. (such as SELECT COUNT( * ) FROM PROJECT will return a Long object.
b) If the query has more than one column, then it will return a Map of that result.
c) If the outputClass is set, then it will convert the query result into an Java bean object by calling all the setters that match t he column names. It will assume your class has a default constructor to create instance with. From Camel 2.14 onwards then SelectList is also supported.
d) If the query resulted in more than one rows, it throws an non-unique result exception.
Camel 2.14.0: New StreamList output type value that streams the result of the query using an Iterator<Map<String, Object>>, it can be used along with the Splitter EIP.

outputClass

null

Camel 2.12.1: Specify the full package and class name to use as conversion when outputType=SelectOne. From Camel 2.14 onwards then SelectList is also supported.

beanRowMapper

 

Camel 2.12.1: 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".

Result

By default the result is returned in the OUT body as an ArrayList<HashMap<String, Object>>. The List object contains the list of rows and the Map objects contain each row with the String key as the column name. You can use the option outputType to control the result.

Note: This component fetche s ResultSetMetaData to be able to return the column name as the key in the Map.

Message Headers

Header

Description

CamelJdbcRowCount

If the query is a SELECT, query the row count is returned in this OUT header.

CamelJdbcUpdateCount

If the query is an UPDATE, query the update count is returned in this OUT header.

CamelGeneratedKeysRows

Camel 2.10: Rows that contains the generated kets.

CamelGeneratedKeysRowCount

Camel 2.10: The number of rows in the header that contains generated keys.

CamelJdbcColumnNames

Camel 2.11.1: The column names from the ResultSet as a java.util.Set type.

CamelJdbcParametes

Camel 2.12: A java.util.Map which has the headers to be used if useHeadersAsParameters has been enabled.

Generated keys

Available as of Camel 2.10

If you insert data using SQL INSERT, then the RDBMS may support auto generated keys. You can instruct the JDBC producer to return the generated keys in headers.
To do that set the header CamelRetrieveGeneratedKeys=true. Then the generated keys will be provided as headers with the keys listed in the table above.

You can see more details in this unit test.

Icon

Using generated keys does not work with together with named parameters.

Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/jdbc.html ============================================================================== --- websites/production/camel/content/jdbc.html (original) +++ websites/production/camel/content/jdbc.html Wed Jan 28 10:20:18 2015 @@ -103,7 +103,7 @@

URI format

-

This component only supports producer endpoints.

You can append query options to the URI in the following format, ?option=value&option=value&...

Options

Name

Default Value

Description

readSize

0

The default maximum number of rows that can be read by a polling query. The default value is 0.

statement.<xxx>

null

Camel 2.1: Sets additional options on the java.sql.Statement that is used behind the scenes to execute the queries. For instance, statement.maxRows=10. For detailed documentation, see the java.sql.Statement javadoc documentation.

useJDBC4ColumnNameAndLabelSemantics

true

Camel 2.2: Sets whether to use JDBC 4/3 column label/name semantics. You can use this option to turn it false in case you have issues with your JDBC driver to select data. This only applies when using SQL SELECT using aliases (e.g. SQL SELECT id as identifier, name as given_name from persons).

resetAutoCommit

true

Camel 2.9: 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.

allowNamedParameters

true

Camel 2.12: Whether to allow using named parameters in the queries.

prepareStatementStrategy

 

Camel 2.12: Allows to plugin to use a custom org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy to control preparation of the query and prepared statement.

useHeadersAsParameters

false

Camel 2.12: 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 fo r the query placeholders.

outputType

SelectList

Camel 2.12.1: Make the output of the producer to SelectList as List of Map, or SelectOne as single Java object in the following way:
a) If the query has only single column, then that JDBC Column object is returned. (such as SELECT COUNT( * ) FROM PROJECT will return a Long object.
b) If the query has more than one column, then it will return a Map of that result.
c) If the outputClass is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with. From Camel 2.14 onwards then SelectList is also supported .
d) If the query resulted in more than one rows, it throws an non-unique result exception.
Camel 2.14.0: New StreamList output type value that streams the result of the query using an Iterator<Map<String, Object>>, it can be used along with the Splitter EIP.

outputClass

null

Camel 2.12.1: Specify the full package and class name to use as conversion when outputType=SelectOne. From Camel 2.14 onwards then SelectList is also supported.

beanRowMapper

 

Camel 2.12.1: 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".

Result

By default the result is returned in the OUT body as an ArrayList<HashMap<String, Object>>. The List object contains the list of rows and the Map objects contain each row with the String key as the column name. You can use the option outputType to control the result.

Note: This component fetches ResultSetMetaData to be able to return the column name as the key in the Map.

Message Headers

Header

Description

CamelJdbcRowCount

If the query is a SELECT, query the row count is returned in this OUT header.

CamelJdbcUpdateCount

If the query is an UPDATE, query the update count is returned in this OUT header.

CamelGeneratedKeysRows

Camel 2.10: Rows that contains the generated kets.

Ca melGeneratedKeysRowCount

Camel 2.10: The number of rows in the header that contains generated keys.

CamelJdbcColumnNames

Camel 2.11.1: The column names from the ResultSet as a java.util.Set type.

CamelJdbcParametes

Camel 2.12: A java.util.Map which has the headers to be used if useHeadersAsParameters has been enabled.

Generated keys

Available as of Camel 2.10

If you insert data using SQL INSERT, then the RDBMS may support auto generated keys. You can instruct the JDBC producer to return the generated keys in headers.
To do that set the header CamelRetrieveGeneratedKeys=true. Then the generated keys will be provided as headers with the keys listed in the table above.

You can see more details in this unit test.

+

This component only supports producer endpoints.

You can append query options to the URI in the following format, ?option=value&option=value&...

Options

Name

Default Value

Description

readSize

0

The default maximum number of rows that can be read by a polling query. The default value is 0.

statement.<xxx>

null

Camel 2.1: Sets additional options on the java.sql.Statement that is used behind the scenes to execute the queries. For instance, statement.maxRows=10. For detailed documentation, see the java.sql.Statement javadoc documentation.

useJDBC4ColumnNameAndLabelSemantics

true

Camel 2.2: Sets whether to use JDBC 4/3 column label/name semantics. You can use this option to turn it false in case you have issues with your JDBC driver to select data. This only applies when using SQL SELECT using aliases (e.g. SQL SELECT id as identifier, name as given_name from persons).

resetAutoCommit

true

Camel 2.9: 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.

allowNa medParameters

true

Camel 2.12: Whether to allow using named parameters in the queries.

prepareStatementStrategy

 

Camel 2.12: Allows to plugin to use a custom org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy to control preparation of the query and prepared statement.

useHeadersAsParameters

false

Camel 2.12: 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

SelectList

Camel 2.12.1: Make the output of the producer to SelectList as List of Map, or SelectOne as single Java object in the following way:
a) If the query has only single column, then that JDBC Column object is returned. (such as SELECT COUNT( * ) FROM PROJECT will return a Long object.
b) If the query has more than one column, then it will return a Map of that result.
c) If the outputClass is set, then it will convert the query result into an Java bean object by calling all the setters that match the column na mes. It will assume your class has a default constructor to create instance with. From Camel 2.14 onwards then SelectList is also supported.
d) If the query resulted in more than one rows, it throws an non-unique result exception.
Camel 2.14.0: New StreamList output type value that streams the result of the query using an Iterator<Map<String, Object>>, it can be used along with the Splitter EIP.

outputClass

null

Camel 2.12.1: Specify the full package and class name to use as conversion when outputType=SelectOne. From Camel 2.14 onwards then SelectList is also supported.

beanRowMapper

 

Camel 2.12.1: 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".

Result

By default the result is returned in the OUT body as an ArrayList<HashMap<String, Object>>. The List object contains the list of rows and the Map objects contain each row with the String key as the column name. You can use the option outputType to control the result.

Note: This component fetches ResultSetMeta Data to be able to return the column name as the key in the Map.

Message Headers

Header

Description

CamelJdbcRowCount

If the query is a SELECT, query the row count is returned in this OUT header.

CamelJdbcUpdateCount

If the query is an UPDATE, query the update count is returned in this OUT header.

CamelGeneratedKeysRows

Camel 2.10: Rows that contains the generated kets.

CamelGeneratedKeysRowCount

Camel 2.10: The number of rows in the header that contains generated keys.

CamelJdbcColumnNames

Camel 2.11.1: The column names from the ResultSet as a java.util.Set type.

CamelJdbcParametes

Camel 2.12: A java.util.Map which has the headers to be used if useHeadersAsParameters has been enabled.

Generated keys

Available as of Camel 2.10

If you insert data using SQL INSERT, then the RDBMS may support auto generated keys. You can instruct the JDBC producer to return the generated keys in headers.
To do that set the header CamelRetrieveGeneratedKeys=true. Then the generated keys will be provided as headers with the keys listed in the table above.

You can see more details in this unit test.

Icon

Using generated keys does not work with together with named parameters.