-
Sub-task
-
Resolution: Obsolete
-
Major
-
None
-
None
Currently within the shutdown we generally just do something like
AtomicBoolean shutdown = new AutomaticBoolean(false);
public void shutdown()
{
while (still deployments)
removeDeployments();
shutdown.set(true);
}
public void deploy()
{
if (shutdown.get())
throw new IllegalStateException("Already shutdown");
}
This needs improving to
1) Have a prepareShutdown() so we can signal that new deployments are not allowed earlier
2) The IllegalStateException should be replaced with a ShutdownException such that the caller
can ignore such errors and deal with the shutdown more gracefully