[Batchserver-cvs] batchserver/src/org/jmonks/batchserver/framework/controller/pool JobPool.java, 1
Brought to you by:
suresh_pragada
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/controller/pool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10680/controller/pool Modified Files: JobPool.java PoolJobController.java PoolJobLoader.java PoolJobProcessor.java Log Message: no message Index: PoolJobProcessor.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/controller/pool/PoolJobProcessor.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PoolJobProcessor.java 13 Sep 2006 23:29:45 -0000 1.8 --- PoolJobProcessor.java 14 Sep 2006 23:05:13 -0000 1.9 *************** *** 23,27 **** * </p> * ! * @param configProps Configuration defined for the job processor in job configuration. * @param pool Reference to Job Pool. * --- 23,27 ---- * </p> * ! * @param jobContext Context the job is being run. * @param pool Reference to Job Pool. * Index: PoolJobLoader.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/controller/pool/PoolJobLoader.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PoolJobLoader.java 13 Sep 2006 23:29:45 -0000 1.9 --- PoolJobLoader.java 14 Sep 2006 23:05:13 -0000 1.10 *************** *** 23,38 **** * When finished loading of all the job data, loads the <i>null</i> into the pool * to singal the processor(s) that loading of all the jobs have been done. ! * Configuration defined for this loader in job configuration will be accessed by ! * configProps map received from controller. * <br> * Example loading the 100 integer objects into the pool. * <pre> ! * public class MyLoader * { ! * public ErrorCode loadPool(Map configProps, JobPool pool) * { * for(int i=0;i<100;i++ * pool.loadJobData(new Integer(i)); * pool.loadJobData(null); * } * } --- 23,40 ---- * When finished loading of all the job data, loads the <i>null</i> into the pool * to singal the processor(s) that loading of all the jobs have been done. ! * Configuration defined for this loader in job configuration can be accessed ! * using job context reference. * <br> * Example loading the 100 integer objects into the pool. * <pre> ! * public class MyLoader implements PoolJobLoader * { ! * public ErrorCode loadPool(JobContext jobContext, JobPool pool) * { * for(int i=0;i<100;i++ * pool.loadJobData(new Integer(i)); * pool.loadJobData(null); + * + * return ErrorCode.JOB_COMPLETED_SUCCESSFULLY * } * } *************** *** 40,44 **** * </p> * ! * @param configProps Properties defined for this job loader in job configuration. * @param pool Job Pool reference. * --- 42,46 ---- * </p> * ! * @param jobContext Context of the job being run. * @param pool Job Pool reference. * Index: JobPool.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/controller/pool/JobPool.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** JobPool.java 13 Sep 2006 23:29:45 -0000 1.7 --- JobPool.java 14 Sep 2006 23:05:12 -0000 1.8 *************** *** 16,23 **** { /** ! * Controller calls this method with the properties defined in the configuration ! * before reference is being passed to the job loader and job processor. * ! * @param configProps Properties defined in the configuration for the job pool. */ public void initialize(JobContext jobContext); --- 16,25 ---- { /** ! * Controller calls this method to initialize the job pool. This will be called ! * before pool reference is being passed to the job loader and job processor. ! * All the configuration defined for the job pool can be retrieved using ! * job context reference. * ! * @param jobContext Context of the job being run. */ public void initialize(JobContext jobContext); Index: PoolJobController.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/controller/pool/PoolJobController.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PoolJobController.java 13 Sep 2006 23:29:45 -0000 1.15 --- PoolJobController.java 14 Sep 2006 23:05:12 -0000 1.16 *************** *** 58,62 **** * <i>DB Configuration is as follows</i> * <table> ! * <tr><td>Column</td><td>Value</td></tr> * </table> * </p> --- 58,74 ---- * <i>DB Configuration is as follows</i> * <table> ! * <tr><td><b>TableName.ColumnName</b></td><td><b>Value</b></td></tr> ! * <tr><td>job_config.job_name</td><td>process_file_abc</td></tr> ! * <tr><td>job_config.job_status</td><td>1</td></tr> ! * <tr><td>job_config.job_controller_class_name</td><td>org.jmonks.batchserver.framework.controller.pool.PoolJobController</td></tr> ! * <tr><td>job_config.job_controller_props</td><td>pool-controller-config1=pool-controller-value1:pool-controller-config1=poo2-controller-value2</td></tr> ! * <tr><td>pool_job_controller_config.job_name</td><td>process_file_abc</td></tr> ! * <tr><td>pool_job_controller_config.pool_job_loader_class_name</td><td>com.mycompany.batch.processfileabc.AbcJobLoader</td></tr> ! * <tr><td>pool_job_controller_config.pool_job_loader_props</td><td>pool-job-loader-key1=loader-value1</td></tr> ! * <tr><td>pool_job_controller_config.pool_job_processor_class_name</td><td>com.mycompany.batch.processfileabc.AbcJobProcessor</td></tr> ! * <tr><td>pool_job_controller_config.pool_job_processor_props</td><td>pool-job-processor-key1=processor-value1</td></tr> ! * <tr><td>pool_job_controller_config.pool_job_processor_thread_cnt</td><td>5</td></tr> ! * <tr><td>pool_job_controller_config.job_pool_class_name</td><td>org.jmonks.batchserver.framework.controller.pool.CollectionJobPool</td></tr> ! * <tr><td>pool_job_controller_config.job_pool_props</td><td>job-pool-size=5000</td></tr> * </table> * </p> *************** *** 411,415 **** * @param countDownLock Count down to be released at the end of the processing. * @param jobLoader Job Loader that needs to be invoked. ! * @param configProps Properties defined for this loader in job configuration. * @param pool Job pool where the loader needs to load the jobs. * --- 423,427 ---- * @param countDownLock Count down to be released at the end of the processing. * @param jobLoader Job Loader that needs to be invoked. ! * @param jobContext Context of the job being run. * @param pool Job pool where the loader needs to load the jobs. * *************** *** 450,454 **** * @param countDownLock Count down to be released at the end of the processing. * @param jobProcessor Job processor that needs to be invoked. ! * @param configProps Properties defined for this loader in job configuration. * @param pool Job pool where the processor needs to pull the jobs. * --- 462,466 ---- * @param countDownLock Count down to be released at the end of the processing. * @param jobProcessor Job processor that needs to be invoked. ! * @param jobContext Context of the job being run. * @param pool Job pool where the processor needs to pull the jobs. * |