Skip to content

Abort/failed the job gracefully during Spring Batch shutdown [BATCH-2064] #1530

@spring-projects-issues

Description

@spring-projects-issues

Simon Wong opened BATCH-2064 and commented

During application context closing, only JobRegistry will respect to the destroy phase in Spring life cycle and cleanup the job information in registry.

The job itself might still be in "STARTED" status after the application context closed. It will be better to add a strategy interface to fail/stop the jobs before the application context closed (By default, maybe all the running jobs should be STOPPED).

Currently, I have to do this manually in @PreDestroy phase.


Affects: 2.2.0

Reference URL: http://numberformat.wordpress.com/2012/04/24/shutting-down-spring-batch-jobs-gracefully/

1 votes, 3 watchers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions