Chapter 6. WebSphere Batch 147
Figure 6-5 illustrates the main architecture of the batch container. The function that
dispatches the job is the batch container. The batch controller bean controls the batch
application and processes the job definition from start to finish.
Figure 6-5 Batch container view
Batch applications run under the control of an asynchronous bean, which is similar to a
container-managed thread.
6.3.3 xJCL
Jobs are described by using an XML job control language (xJCL) that identifies the batch
application to run. The xJCL definition is similar to a traditional JCL. The xJCL definition of a
job is not part of the batch application. Rather, it is constructed separately and submitted to
the job scheduler to run. The job definition identifies which batch application to run, and its
inputs and outputs. It also identifies which checkpoint algorithms and results algorithms to
use. The job scheduler uses information in the xJCL to determine where and when to run the
WebSphere Application Server
WebSphere Application Server
Foundation Services level
(security, transaction, data access, logging, and so forth)
Job steps
Data access
Java virtual machine
BATCH container
IBM batch
classes and APIs
148 WebSphere Application Server V8.5 Concepts, Planning, and Design Guide
Figure 6-6 shows an xJCL example.
Figure 6-6 xJCL example
xJCL sample for a compute-intensive job
Example 6-1 shows a generic compute-intensive sample.
Example 6-1 xJCL sample for a compute intensive job
<?xml version="1.0" encoding="UTF-8" ?>
<job name="OpenGrid" class="xyz" accounting="accounting info"
<required-capability expression="someExpression" />
<required-capability expression="anotherExpression" />
<prop name="PATH" value="C:\\windows;C:\\java\\jre\\bin" />
<job-step name="Step1" application-name="tryit">
<env-var name="PATH" value="${PATH}" />
<env-var name="CLASSPATH" value="C:\\windows" />
<exec executable="java">
<arg line="command line args here" />
<arg line=" and more command line args here" />
<?xml version="1.0" encoding="UTF-8" ?>
<job name="name" >
<prop name="property_name" value="value" />
<job-step name="name">
<classname>package.class </classname>
<checkpoint-algorithm-ref name="chkpt"/>
<resutls-ref name="jobsum"/>
<logical-name>input_stream </logical-name>
<prop name="name" value="value"/>
Roughly analogous
to the JOB card
A job step
Similar to the
statement in JCL
Similar to DD
Chapter 6. WebSphere Batch 149
xJCL sample for a batch job
Example 6-2 shows a sample batch job that demonstrates how to start existing session
beans from within job steps.
Example 6-2 xJCL sample for a batch job
<job name="PostingsSampleEar"
<checkpoint-algorithm name="${checkpoint}">
<prop name="interval" value="${checkpointInterval}" />
<results-algorithm name="jobsum">
<prop name="wsbatch.count" value="5" />
<prop name="checkpoint" value="timebased" />
<prop name="checkpointInterval" value="15" />
<prop name="postingsDataStream"
value="${was.install.root}${file.separator}temp${file.separator}postings" />
<job-step name="Step1">
<!-- apply checkpoint policy to step1 -->
<checkpoint-algorithm-ref name="${checkpoint}" />
<results-ref name="jobsum"/>
<prop name="FILENAME" value="${postingsDataStream}" />
<prop name="wsbatch.count" value="${wsbatch.count}" />

Get WebSphere Application Server V8.5 Concepts, Planning, and Design Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.