Information Management IBM InfoSphere Master Data Management, Version 10.1

Building custom batch jobs for the J2SE Batch Processor framework

You can build custom batch jobs, in conjunction with the Request/Response and Extension framework.

Building custom batch jobs are a good option when:

Each of these extension mechanisms are defined in their respective section of the Developers Guide.

Developing custom reader components

The reader component of the batch processor reads the batch input and returns it one record at a time. The batch processor does not depend on any specific batch input; instead it relies on the reader to read the input by passing it the input URL as passed from the command line arguments.

Any reader running within the batch processor implements the com.dwl.batchframework.interfaces.IQueue interface. For more information on this interface and its methods, see the Javadoc API.

Once the reader has been initialized, the batch processor invokes the Remove method on the reader to remove one message from the read queue (the batch input) and return it for subsequent processing.

The new reader implementation class must be configured into the batch processor by setting the ReaderQueue property in the Batch.properties file.

Developing custom writer components

Similar to the way it uses a reader component, the batch processor delegates the call to a writer component for writing the batch output. New writers can be developed by implementing the com.dwl.batchframework.interfaces.IQueue interface and setting the implementation class name as the value for WriterQueue property in the Batch.properties file.

Note: If Writer.includeTimestamp is configured as true, then custom writers should include the timestamp in their output format

The IQueue interface, implemented by the reader and writer classes uses com.dwl.batchframework.interfaces.IMessage interface to represent individual record data. A default implementation of the IMessage interface (com.dwl.batchframework.queue.BatchMessage ) is provided in the batch processor. You can use this default implementation in your custom reader and writer classes or you can build a new IMessage implementation.



Feedback

Timestamp Last updated: 18 Jul 2013

Topic URL: