Commit db472de5 authored by Guus der Kinderen's avatar Guus der Kinderen

JMXWeb plugin should not NPE on destruction.

parent fea65b9b
......@@ -43,11 +43,17 @@
<h1>
</h1>
<p><b>0.0.1 -- January 9th 2015</p>
<p><b>0.0.2</b> -- December 1st 2015</p>
<ul>
<li>Minor bugfix: prevent null-pointer exception while stopping plugin.</li>
</ul>
<p><b>0.0.1</b> -- January 9th 2015</p>
<ul>
<li>Initial Version</li>
</ul
</ul>
</body>
</html>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<class>com.ifsoft.jmxweb.plugin.JmxWebPlugin</class>
<name>JmxWeb Plugin</name>
<description>JmxWeb plugin is web based platform for managing and monitoring openfire via JMX.</description>
<version>0.0.1</version>
<version>0.0.2</version>
<licenseType>Apache 2.0</licenseType>
<date>01/09/2015</date>
<minServerVersion>3.9.9</minServerVersion>
......
......@@ -143,17 +143,25 @@ public class JmxWebPlugin implements Plugin {
public void destroyPlugin() {
Log.info( "["+ NAME + "] destroy " + NAME + " plugin resources");
database.stop();
JmxHelper.unregister(OBJECTNAME_DATABASEPOOL);
if (database != null) {
database.stop();
JmxHelper.unregister(OBJECTNAME_DATABASEPOOL);
}
client.stop();
JmxHelper.unregister(OBJECTNAME_CORE_CLIENT_THREADPOOL);
if (client != null) {
client.stop();
JmxHelper.unregister(OBJECTNAME_CORE_CLIENT_THREADPOOL);
}
packetCounter.stop();
JmxHelper.unregister(OBJECTNAME_PACKET_COUNTER);
if (packetCounter != null) {
packetCounter.stop();
JmxHelper.unregister(OBJECTNAME_PACKET_COUNTER);
}
openfire.stop();
JmxHelper.unregister(OBJECTNAME_OPENFIRE);
if (openfire != null) {
openfire.stop();
JmxHelper.unregister(OBJECTNAME_OPENFIRE);
}
Log.info("["+ NAME + "] plugin fully destroyed.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment