Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop batch applications > Develop batch applications > Develop a simple transactional batch application > The batch programming model


Batch data streams


Batch data streams (BDS) are Java objects that provide an abstraction for the data stream processed by a batch step. A batch step can have one or more BDS objects associated with it. The grid endpoints make the BDS associated with the batch step available at run time. The grid endpoints also manages the life cycle of a BDS by invoking batch-specific callbacks.

A BDS object implements the interface...

com.ibm.websphere.batch.BatchDataStream

This interface is server agnostic. The implementing object can retrieve data from any type of data source, for example, files and databases. Call back methods on the BatchDataStream interface allow the grid endpoints to manage the BDS at run time. One of the key features of a BDS is its capability to convey its current position in the stream to the grid endpoints, and the capability to move itself to a given location in the data stream. This feature allows the grid endpoints to record (in the grid endpoints database) how much data a batch step has processed. This information is recorded on every checkpoint. Therefore, the grid endpoints can restart a batch job from a recorded position in the data stream if the job is canceled or fails in a recoverable manner.

The following main methods exist for the BatchDataStream interface. See the API for the BatchDataStream interface for additional information.

The BatchDataStream interface does not have methods for retrieving or writing data. There are no getNextRecord and putNextRecord methods defined on the interface that a batch step calls to read or write to the BDS object. Methods for passing data between the batch step and the BDS object are left up to the implementation of the BDS object. Review the batch Samples that this product supports to see examples of how to implement batch data streams.

Transaction environment

All methods of a BDS object are called in a global transaction. There is no guarantee that any consecutive method calls made to a BDS object happen in the same transaction because the transaction is owned by the grid endpoints, not the BDS object.

The batch programming model
Program Interfaces (APIs)

+

Search Tips   |   Advanced Search