WebSphere Extended Deployment Compute Grid, Version 6.1
             Operating Systems: AIX, HP-UX, Linux, Solaris, Windows, z/OS


Batch controller bean

In its deployment descriptor, a batch application is required to declare a special stateless session bean (SLSB). This bean acts as a batch job controller and must contain local enterprise beans references to all the batch step enterprise beans that the batch application uses.

Each batch application can include only a single controller bean. This single controller bean can reference any number of batch job step Enterprise JavaBeans (EJB), for batch applications, or can be used to invoke any number of CIWork objects, for compute-intensive applications, defined within the application. You can only include a controller bean in a single work class, and a Compute Grid 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 all batch step EJB and 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 SLSB:
<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>
    <ejb-local ref id="EJBLocalRef_1094060718999">
            <ejb-ref-name>ejb/step1</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            <local-home>com.ibm.websphere.batch.BatchJobStepLocalHomeInterface
</local-home>
            
            <local>com.ibm.websphere.batch.BatchJobStepLocalInterface
</local>
            <ejb-link>Step1EJB</ejb-link>
					</ejb-local-ref>
    
    <ejb-local-ref id="EJBLocalRef_1094060719009">
            <ejb-ref-name>ejb/step2</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            <localhome>com.ibm.websphere.batch.
BatchJobStepLocalHomeInterface</localhome>
            
            <local>com.ibm.websphere.batch.
BatchJobStepLocalInterface
</local>
            <ejb-link>Step2EJB</ejb-link>
					</ejb-local-ref>
    <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    

Terms of Use | Feedback

Last updated: Oct 30, 2009 6:22:31 PM EDT
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r1/index.jsp?topic=/com.ibm.websphere.gridmgr.doc/info/scheduler/cxdbatchcb.html