spring-projects/spring-xd — pull request #826 by ilayaperumalg (2014-05-07 21:29:40+00:00)
Title: XD-1641 Handle batchJob re-deployment

- If the container that has the job deployed crashed (without graceful shutdown), then
the BatchJobLocator still holds the entries for the batch job with the given name.
Upon the container departure, the admin leader tries to re-deploy the job module into
available matching container. But, the DistributedJobLocator still holds the reference to
the batch job (from the crashed container).
- On re-deployment, make sure to delete the entries from DistributedJobLocator and
proceed with the job deployment.
- Also, any first time job deployment wouldn't reach this block as the admin server
would have already checked for any existing batch job and stops any request to create one.
- If the container gracefully shuts down
- The `destroy` life-cycle operation on DistributedJobLocator will make sure to remove
the entries for the given job name