IBM WebSphere Extended Deployment (XD)TM
Release 6.0

com.ibm.websphere.batch
BatchDataStream



The BatchDataStream (BDS) interface provides an abstraction over the data that is processed by a Batch Step. It provides the set of methods that are called by the Batch Execution Environment (BEE) in order to intitialize the data stream, retrieve cursor information from the BDS, and position the BDS to a specified cursor during processing of a Batch Step.

This is the order in which methods are called on a BDS during normal execution of a batch step: This is the order in which methods are called on a BDS when a batch step restarts processing a bds:

Environment The batch data stream is a java object that will be called from both the Batch Execution Environment and the Batch Job Step EJB.




Method Summary
public  StringexternalizeCheckpointInformation()
          

The externalizeCheckpointInformation method is called by the Batch Execution Environment (BEE) during the checkpoint completion phase of processing.

public  voidinternalizeCheckpointInformation(java.lang.String)
          

The internalizeCheckpointInformation mehtod is called by the Batch Execution Environment during the restart of a Batch Step Bean, this allows the BDS to restart its internal state to the point it was at when the last successfuly checkpoint was processed.

public  voidinitialize(java.lang.String, java.lang.String)
          

The initialize method is called by Batch Execution Environment during the initialization of the job step, this allows the BDS to initialize the stream for use of the Batch Step Bean.

public  voidpositionAtInitialCheckpoint()
          

The positionAtInitialCheckpoint is called by Batch Execution Environment to provide a signal to the BDS that it should start processing the stream at the initial point as defined by the xJCL inputs.

public  voidpositionAtCurrentCheckpoint()
          

The positionAtCurrentCheckpoint method is called by Batch Execution Environment to provide a signal to the BDS that it should start processing the stream at the point that was defined in the internalizeCheckpointInformation method set.

public  voidopen()
          

The open method is called by the Batch Execution Environment to indicate that the BDS is about to be used and to prepare the BDS for operation.

public  voidclose()
           The close method is called by the Batch Execution Environment to indicate to the BDS that the user of the BDS is done working with the BDS.
public  StringgetName()
          
public  voidsetProperties(java.util.Properties)
          

The setProperties is called by the Batch Execution Environment to pass bds properties specified in xJCL to the bds as a java.

public  PropertiesgetProperties()
          
public  voidintermediateCheckpoint()
          

The intermediateCheckpoint method is called by the Batch Execution Environment to indicate to the BDS that a checkpoint has just completed; i.


Method Detail

externalizeCheckpointInformation

public String externalizeCheckpointInformation()

The externalizeCheckpointInformation method is called by the Batch Execution Environment (BEE) during the checkpoint completion phase of processing. This allows the BDS to record a set of information with the BEE, that will be committed with the checkpoints global transaction to the BEE database. The information that is returned needs to contain enough data to allow the BDS to reposition itself during a restart of the Batch Step Bean.

Additional information can be stored in this string as well, but the larger the string, the slower the Batch Execution Environment will be in storing it in the RDB that it is maintaining.



Returns:
     - This is a string that is created to record the BDS's postion in the stream being processed. This String is opaque to anyone but the BDS, so only the BDS can interprete its content.


internalizeCheckpointInformation

public void internalizeCheckpointInformation(String chkptinfo)

The internalizeCheckpointInformation mehtod is called by the Batch Execution Environment during the restart of a Batch Step Bean, this allows the BDS to restart its internal state to the point it was at when the last successfuly checkpoint was processed. It is at this point in the processing that the Batch Step Bean will begin processing.

Parameters:
    chkptinfo - - This is a string that was created by the BDS that was returned to the Batch Execution Environment on the externalizeCheckpointInformation method. This String is opaque to anyone but the BDS, so only the BDS can interpret its content.


initialize

public void initialize(String ilogicalname,String ijobstepid)

The initialize method is called by Batch Execution Environment during the initialization of the job step, this allows the BDS to initialize the stream for use of the Batch Step Bean. The method is passed the logical name of the BDS and the JobStepID. These two pieces of information are used to create a BatchDataStreamConfig object that has the configuration information necessary to establish the stream. The initialize method should configure the stream as defined by the config object and validate the input source or output sink (e.g. is the dataset available? can I connect to the database being processed?). If the BDS is not valid throw the BatchDataStreamConfigurationFailed exception.

Parameters:
    ilogicalname - the logical name of the BDS, this name is used to locate the resource in the job's xJCL.
    ijobstepid - an identifier that represents the step within the batch job that is being run, this id is used to locate the recsource in the job's xJCL.


Throws:
    com.ibm.websphere.batch.BatchDataStreamConfigurationFailed


positionAtInitialCheckpoint

public void positionAtInitialCheckpoint()

The positionAtInitialCheckpoint is called by Batch Execution Environment to provide a signal to the BDS that it should start processing the stream at the initial point as defined by the xJCL inputs.



positionAtCurrentCheckpoint

public void positionAtCurrentCheckpoint()

The positionAtCurrentCheckpoint method is called by Batch Execution Environment to provide a signal to the BDS that it should start processing the stream at the point that was defined in the internalizeCheckpointInformation method set.



open

public void open()

The open method is called by the Batch Execution Environment to indicate that the BDS is about to be used and to prepare the BDS for operation. This includes things such as openning files that are used by the BDS's implementation.



close

public void close()
The close method is called by the Batch Execution Environment to indicate to the BDS that the user of the BDS is done working with the BDS. This allows the BDS to free resources that it is holding.


getName

public String getName()


setProperties

public void setProperties(Properties properties)

The setProperties is called by the Batch Execution Environment to pass bds properties specified in xJCL to the bds as a java.util.Properties object.

Parameters:


getProperties

public Properties getProperties()


intermediateCheckpoint

public void intermediateCheckpoint()

The intermediateCheckpoint method is called by the Batch Execution Environment to indicate to the BDS that a checkpoint has just completed; i.e. a global transaction has been committed and a new global transaction has started.



IBM WebSphere Extended Deployment (XD)TM
Release 6.0