Jan 13th, 2009, 12:36 AM
Clearing of BATCH_* tables
I had earlier posted a query regarding clearing the data created in these tables(BATCH_JOB_INSTANCE, BATCH_JOB_EXECUTION, BATCH_JOB_PARAMS, BATCH_STEP_EXECUTION, BATCH_STEP_EXECUTION_CONTEXT) after the job execution has complete.
You had replied that this feature is not available.
We can not maintain these data in our production environment.
So i need to clear them manually. Can you let me know where actually i can put in the clear code?
Cant we put in the close(ExecutionContext ctx) method? I tried to stop the execution but still some references to the data in the table.
Jan 13th, 2009, 03:38 AM
If you want to clear the data on every suddessful execution, you would have to put it in whatever code calls the JobLauncher (the Job and Step update data while they are running, so it needs to go outside the call to Job.execute()). Careful not to delete data related to other jobs, or relating to failed jobs.