Home > Cloud Cruiser 3 > Batch XML Reference > Universal collectors > JDBC > SmartJdbcCollector


Table of contents
No headers

A CC-Record reader that collects usage data from a database query or procedure call based on a configuration provided by JdbcFeedConfig . This reader requires that the database connection supports cursors.

NOTE: Procedure calls are not supported for Oracle in this version.


<bean class="com.cloudcruiser.batch.collect.SmartJdbcCollector">


<property name="dataSourceConfig">

Sets the connection information necessary to create a Data Source for managing a connection with the database. This property contains another bean configuring how to connect to the data source.

<property name="fetchSize" value="jdbcFetchSize

Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object. If the fetch size specified is zero, the JDBC driver ignores the value. A value of -1 (the default) can be set to use driver defaults.

<property name="maxRows" value="maxRows

Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number. A value of -1 (the default) can be set to use driver defaults.

<property name="queryTimeout" value="jdbcQueryTimeout">

Sets the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded, an SQLException is thrown.

A value of -1 (the default) can be set to use driver defaults. A value of 0 (zero) is no limit, and should wait forever, but might not work as expected across all drivers. It is recommended to set an explicit timeout if -1 is not sufficient.

<property name="ignoreWarnings" value="true">

Sets whether SQLWarnings should be ignored or an exception should be thrown. If true , warnings are ignored.

<property name="verifyCursorPosition" value="false">

Allows verification of the cursor position after current row is processed. Default value is false . Cursor position verification is not available for TYPE_FORWARD_ONLY result sets. If true , the cursor position is verified.

<property name="feedConfig" value="feedConfig

Sets the feed configuration for this collector. The feed configuration defines the JDBC request and maps results into CC-Record content.

Spring Batch XML Example

<batch:step id="collect" next="assemble">
    <bean class="com.cloudcruiser.batch.CCRecordCollectTasklet">
      <property name="active" value="true"/>
      <property name="feedName" value="ccdb"/>
      <property name="collector">
        <bean id="sampleJdbcReader" class="com.cloudcruiser.batch.collect.SmartJdbcCollector">
          <property name="feedConfig" ref="feedConfig"/>
          <property name="fetchSize" value="-1"/>
          <property name="maxRows" value="-1"/>
          <property name="queryTimeout" value="-1"/>
          <property name="ignoreWarnings" value="true"/>
          <property name="verifyCursorPosition" value="false"/>
          <property name="dataSourceConfig">
            <bean class="com.cloudcruiser.batch.collect.ManagedDataSource">
              <property name="name" value="My DataSource"/>
Last modified


This page has no custom tags.


This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP