Apr 26th, 2011, 10:23 AM
Fire JMS Message when Job Completes
I thought I would post this while I run through the docs and this board...
New to Spring Batch, so the usual apologies if this has already been answered....
I would like to fire a JMS message when a job completes. Is there some way to plugin to this in the framework?
Apr 26th, 2011, 10:25 AM
Looks like JobExecutionListener is what I want....
Apr 26th, 2011, 11:13 AM
Exactly my idea!
Create a Bean which implements the afterJob from the JobExecutionListener interface. Define the bean and use the reference as a listener in your job.
The official documentation has something in chapture 4.1.2. Intercepting Job Execution:
Aditionally I would implement the afterPropertiesSet from the InitializingBean interface to check any properties you set, preventing the application to start if the settings are wrong.