JDBC Connector
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.
Note:
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.DB: Main class (Default) |
JndiName | JNDI name of the DataSource Note: If the connection is established via the JNDI name, the parameter Possible values: Valid JNDI name (e. g. |
ColumnCase | Controls how column names of the result set are copied into the result XML document. Since databases have different behaviour regarding the case of columns in the result set, the processing of the output of this adapter can become independent of that behaviour by using the Possible values:
Column names, which are illegal xml element names ( |
connectionURL | Connection URL for the JDBC database Note: If the connection is established via the connection URL, the parameter Possible values:
|
user | User name for authentication via the parameter connectionURL |
password | Password for authentication via the parameter connectionURL |
rootElementName | Name of the root element of the output Possible values: String that is valid for XML element names. Default: |
CommitMode | Defines the version to be used for commits Possible values:
|
AddMetaDataForQueries | (with X4 4.1 Revision 32408 or higher) Controls whether database metadata should be output for each result set in the result XML document of the adapter, when an SQL query is executed (not available for 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 |
| Technical error: more information on the error cause can be found in the server log. |
Input
The JDBC Connector 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.