1

I'm using jberet implementation of jsr 352.

My purpose is to provide a final step in which I send an email with batch information status.

Therefore, even if the previous step (can be either batchlet or a chunk) terminate with unexpected error, I must go through the final step and report what happened.

What is the best approach to do this? Maybe using some listeners?

Fabrizio Stellato
  • 1,727
  • 21
  • 52

1 Answers1

2

Yes, javax.batch.api.listener.JobListener#afterJob is the best place to do that. See its javadoc here.

cheng
  • 1,076
  • 6
  • 6