public void destroyPlugin() { Log.info("[" + NAME + "] destroy " + NAME + " plugin resources"); if (database != null) { database.stop(); JmxHelper.unregister(OBJECTNAME_DATABASEPOOL); } if (client != null) { client.stop(); JmxHelper.unregister(OBJECTNAME_CORE_CLIENT_THREADPOOL); } if (packetCounter != null) { packetCounter.stop(); JmxHelper.unregister(OBJECTNAME_PACKET_COUNTER); } if (openfire != null) { openfire.stop(); JmxHelper.unregister(OBJECTNAME_OPENFIRE); } if (emailScheduler != null) { emailScheduler.stopMonitoring(); } Log.info("[" + NAME + "] plugin fully destroyed."); }