Batch controller bean

In its deployment descriptor, a batch application is required to declare a special stateless session bean. This bean acts as a batch job controller.

Each application can include only a single controller bean. You can only include a controller bean in a single work class, and a batch application can only have a single work class defined. This single work class is created when the application is installed. You can associate this work class with any service policy that has discretionary or queue-time goal type. The implementation of this bean is provided by WebSphere® Application Server, not by the batch application. The bean must be declared in the batch application deployment descriptor. Only one controller bean per batch application can be defined. The resource references and EJB references declared on the controller bean are available to batch data streams of the batch application in which the controller bean is declared. For example, if a batch data stream in the application needs access to a WebSphere Application Server data source, then a resource reference to that data source can be declared on the controller bean, and the batch data stream can look up the data source at run time in the java:comp/env name space.

Restrictions:

The following example deployment descriptor illustrates a batch controller stateless session bean:
<session id="BatchController>
    <ejb-name>BatchController</ejb-name>
    <home>com.ibm.ws.batch.BatchJobControllerHome</home>
    <remote>com.ibm.ws.batch.BatchJobController</remote>
    <ejb-class>com.ibm.ws.batch.BatchJobControllerBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    <resource-ref id="ResourceRef_1117024737807">
            <description></description>
            <res-ref-name>wm/BatchWorkManager</res-ref-name>
            <res-type>commonj.work.WorkManager</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
         </resource-ref>
</session>



Related concepts
The batch programming model
Concept topic Concept topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 7:16:32 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-express-iseries&topic=cgrid_xdbatchcb
File name: cgrid_xdbatchcb.html