private static void doKill(TopologyContext context) throws Exception { try { context.setCurrentAction("Killing topology"); invokeKill(context); context.setState(TOPOLOGY_STATE_INITIAL); context.setCurrentAction("Topology killed"); } catch (TopologyNotAliveException ex) { LOG.warn("Got TopologyNotAliveException while trying to kill topology, " + "probably the topology was killed externally."); context.setState(TOPOLOGY_STATE_INITIAL); context.setCurrentAction("Setting topology to initial state since its not alive in the cluster"); } catch (Exception ex) { LOG.error("Error while trying to kill the topology", ex); context.setCurrentAction("Killing the topology failed due to: " + ex); throw new IgnoreTransactionRollbackException(ex); } }