/** * If this java application shutdown - we must cancel all current existing listener connections. * Otherwhise the office will run into some DisposedExceptions if it tries to use these forgotten * listener references. And of course it can die doing that. We are registered at a central object * to be informed if the VM will exit. So we can react. */ public void shutdown() { m_aMenuBarListener.shutdown(); m_aToolBarListener.shutdown(); m_aObjectBarListener.shutdown(); m_aMenuBarListener = null; m_aToolBarListener = null; m_aObjectBarListener = null; }