private void cleanUp(ManagedApplication ma) { try { MachineMonitor monitor = ma.getMonitor(); if (monitor != null) monitor.stopTimer(); } catch (Exception e) { ma.getLogger().finest(Utils.writeException(e)); } try { IMessageServerClient client = ma.getMessagingClient(); if (client != null) client.closeConnection(); } catch (Exception e) { ma.getLogger().finest(Utils.writeException(e)); } }