spring-projects/spring-xd — pull request #1055 by ilayaperumalg (2014-07-11 17:36:29+00:00)
Title: XD-1953 Handle undeploy modules upon container shutdown

- When the container process is shutdown, the `Stream/JobModuleWatcher` in
ContainerRegistrar process `Stream/JobDeploymentsPath` node deleted event.
In this case, it triggers undeployment of all the corresponding modules.
But, by the time the undeployment happens the module context is already
closed.
- The fix checks if the module context is active when any of the
Module getComponent() is invoked.
- Fix JobModuleWatcher catch clause to catch `Exception` instead of `KeeperException`
and subsequently check for Curator STARTED state