JDBC Iterator
The adapter connects to a JDBC-compatible database and executes one or multiple database statements handed over as input XML document with an adapter-specific structure. The iterator retrieves and provides the data for processing block by block. The database connection remains open until all data has been retrieved.
The connector requires a JDBC datasource that has been deployed within the application server and for which the connection URL, credentials, schema and transaction behavior etc. are defined. For further information on deploying JDBC datasources consult your application server's documentation.
Properties
Operation | Defines the operation executed by the function adapter Possible values:
|
Parameters
Adapter | Main adapter class (do not change!) Possible values: de.softproject.integration.adapter.jdbc.JdbcIterator: Main class (Default) |
JndiName | JNDI name of the DataSource
Possible values: Valid JNDI name (e. g. |
ColumnCase | Controls how column names are taken over into the result. Since databases have different behaviors regarding the upper and lower case spelling of columns, the processing of the result can be specified here regardless of the database's behavior. Possible values:
Column names, which are not legal element names ( |
connectionURL | Connection URL for the JDBC database
Possible values:
|
user | User name for authentication via the parameter connectionURL |
password | Password for authentication via the parameter connectionURL |
CommitMode | Defines the version to be used for commits Possible values:
|
AddMetaDataForQueries | Controls whether database metadata, see JDBC Metadata Explorer, should be output for each result set within the adapter's result XML document, if the adapter executes an SQL query (not available for Possible values:
|
fetchSize | The number of results per query can be limited by entering a positive integer. If there is data available, the status If the entered number is smaller than |
id | Unique ID of the JDBC Iterator component within the process context, respectively the process instance (if you want to use several JDBC Iterators that iterate regardless of each other within the same process context); Possible values:
|
Status values
1 | The query has returned data records or the instruction has changed data records The status |
0 | The query did not return any results or the statement hasn't changed any data records The status |
-1 | Technical error: more information on the error cause can be found in the server log |
Input
The JDBC Iterator excepts specific input XML structures containing database statements. These input XML structures can be generated dynamically by using XSL mappings that depend on the processed XML data.
Note:
If you use characters within the SQL statement or for the values or data of the table columns that have a meaning in XML, mask the SQL statement with surrounding CDATA block, e.g. <![CDATA[ UPDATE PROCESS SET X4_VERSION=4 WHERE X4_DURATION=100 ]]>
or <rowset><row><name><!CDATA[
XML character “<“ in CDATA element]]></name></row></rowset>
.
This ensures that the characters in the CDATA element are not interpreted as XML, but as data for the adapter.