-
Apr 26th, 2011, 10:23 AM
#1
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?
thanks,
John
-
Apr 26th, 2011, 10:25 AM
#2
Looks like JobExecutionListener is what I want....
-
Apr 26th, 2011, 11:13 AM
#3
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:
http://static.springsource.org/sprin...ngJobExecution
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.
Best wishes,
Robin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules