JDBC Transport Configuration Reference
Following are the elements in the JDBC transport schema.
Connector
Attributes of <connector...>
| Name |
Type |
Required |
Default |
Description |
| pollingFrequency |
long |
no |
|
The delay in milliseconds that will be used during two subsequent polls to the database. This is only applied to queries configured on inbound endpoints. |
| dataSource-ref |
name (no spaces) |
no |
|
Reference to the JDBC DataSource object. This object is typically created using Spring. When using XA transactions, an XADataSource object must be provided. |
| queryRunner-ref |
name (no spaces) |
no |
|
Reference to the QueryRunner object, which is the object that actually runs the Query. This object is typically created using Spring. Default is org.apache.commons.dbutils.QueryRunner. |
| resultSetHandler-ref |
name (no spaces) |
no |
|
Reference to the ResultSetHandler object, which is the object that determines which java.sql.ResultSet gets handled. This object is typically created using Spring. Default is org.apache.commons.dbutils.handlers.MapListHandler, which steps through the ResultSet and stores records as Map objects on a List. |
| transactionPerMessage |
boolean |
no |
|
Whether each database record should be received in a separate transaction. If false, there will be a single transaction for the entire result set. Default is true. |
Child Elements of <connector...>
| Name |
Cardinality |
Description |
| abstract-sqlStatementStrategyFactory |
0..1 |
The factory that determines the execution strategy based on the SQL provided. |
| abstract-query |
0..* |
Defines a set of queries. Each query has a key and a value (SQL statement). Queries are later referenced by key. |
Inbound Endpoint
Receives or fetches data from a database. You can reference SQL select statements or call stored procedures on inbound endpoints. Statements on the inbound endpoint get invoked periodically according to the pollingInterval. Statements that contain an insert, update, or delete are not allowed.
Attributes of <inbound-endpoint...>
| Name |
Type |
Required |
Default |
Description |
| queryKey |
string |
no |
|
The key of the query to use. |
| pollingFrequency |
long |
no |
|
The delay in milliseconds that will be used during two subsequent polls to the database. |
Child Elements of <inbound-endpoint...>
| Name |
Cardinality |
Description |
| abstract-query |
0..* |
|
Outbound Endpoint
You can reference any SQL statement or call a stored procedure on outbound endpoints. Statements on the outbound endpoint get invoked synchronously. SQL select statements or stored procedures may return output that is handled by the ResultSetHandler and then attached to the message as the payload.
Attributes of <outbound-endpoint...>
| Name |
Type |
Required |
Default |
Description |
| queryKey |
string |
no |
|
The key of the query to use. |
| pollingFrequency |
long |
no |
|
The delay in milliseconds that will be used during two subsequent polls to the database. |
Child Elements of <outbound-endpoint...>
| Name |
Cardinality |
Description |
| abstract-query |
0..* |
|
Endpoint
Attributes of <endpoint...>
| Name |
Type |
Required |
Default |
Description |
| queryKey |
string |
no |
|
The key of the query to use. |
| pollingFrequency |
long |
no |
|
The delay in milliseconds that will be used during two subsequent polls to the database. |
Child Elements of <endpoint...>
| Name |
Cardinality |
Description |
| abstract-query |
0..* |
|
Query
Assigns a name (key) to a query (value). Queries
are then referenced by key, such as jdbc://myQuery for
<jdbc:query key="myQuery" value="select * from table"/>
Transaction
Standard Mule transaction configuration. See Transaction Management for usage details.
Sqlstatementstrategyfactory
Override the default SqlStatementStrategyFactory. Determines the
execution strategy based on the SQL provided.
Attributes of <sqlStatementStrategyFactory...>
| Name |
Type |
Required |
Default |
Description |
| class |
class name |
no |
|
| ref |
name (no spaces) |
no |
|
Enterprise-only Features 
In addition to the configuration properties shown above, the Enterprise edition of the JDBC transport contains the following elements:
Maps To Xml Transformer
Converts a List of Map objects to XML. The Map List is the same as what you get
from using the default ResultSetHandler. The XML schema format is provided in the documentation.
Xml To Maps Transformer
Converts XML to a List of Map objects. The Map List is the same as what you get
from using the default ResultSetHandler. The XML schema format is provided in the documentation.
Last Record Map Lookup
Looks up the last Map from a List of Map objects, and then looks up a particular
entry in that Map. The key used for lookup is set on the idField property. Since Maps are equivalent
to database records, the purpose of this transformer in a JDBC context is to find the last record ID
in a batch.
Attributes of <last-record-map-lookup...>
| Name |
Type |
Required |
Default |
Description |
| idField |
string |
no |
|
Name of the key (database column) that identifies the ID column. |
Last Record Map Lookup
Looks up the last Map from a List of Map objects, and then looks up a particular
entry in that Map. The key used for lookup is set on the idField property. Since Maps are equivalent
to database records, the purpose of this transformer in a JDBC context is to find the last record ID
in a batch.
Attributes of <last-record-map-lookup...>
| Name |
Type |
Required |
Default |
Description |
| idField |
string |
no |
|
Name of the key (database column) that identifies the ID column. |
Maps To Csv Transformer
Converts a List of Map objects to a CSV file. The Map List is the same as what you get
from using the default ResultSetHandler.
Attributes of <maps-to-csv-transformer...>
| Name |
Type |
Required |
Default |
Description |
| delimiter |
string |
no |
|
Delimiter used in CSV file. Default is comma. |
| mappingFile |
string |
no |
|
Name of the "mapping file" used to describe the CSV file. See http://flatpack.sourceforge.net for details. |
| ignoreFirstRecord |
boolean |
no |
|
Whether to ignore the first record. If the first record is a header, you should ignore it. |
| qualifier |
string |
no |
|
The character used to escape text that contains the delimiter. |
Csv To Maps Transformer
Converts a CSV file to a List of Map objects. The Map List is the same as what you get
from using the default ResultSetHandler.
Attributes of <csv-to-maps-transformer...>
| Name |
Type |
Required |
Default |
Description |
| delimiter |
string |
no |
|
Delimiter used in CSV file. Default is comma. |
| mappingFile |
string |
no |
|
Name of the "mapping file" used to describe the CSV file. See http://flatpack.sourceforge.net for details. |
| ignoreFirstRecord |
boolean |
no |
|
Whether to ignore the first record. If the first record is a header, you should ignore it. |
| qualifier |
string |
no |
|
The character used to escape text that contains the delimiter. |
Resultset To Maps Transformer
Transforms a java.sql.ResultSet to a List of Map objects just like the
default ResultSetHandler. Useful with Oracle stored procedures that return cursors (ResultSets).