Results 1 to 3 of 3

Thread: Fire JMS Message when Job Completes

  1. #1
    Join Date
    Jul 2006
    Posts
    15

    Default 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

  2. #2
    Join Date
    Jul 2006
    Posts
    15

    Default

    Looks like JobExecutionListener is what I want....

  3. #3
    Join Date
    Nov 2010
    Posts
    11

    Default

    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
  •