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 @@ ...@@ -43,11 +43,17 @@
<h1> <h1>
</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> <ul>
<li>Initial Version</li> <li>Initial Version</li>
</ul </ul>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<class>com.ifsoft.jmxweb.plugin.JmxWebPlugin</class> <class>com.ifsoft.jmxweb.plugin.JmxWebPlugin</class>
<name>JmxWeb Plugin</name> <name>JmxWeb Plugin</name>
<description>JmxWeb plugin is web based platform for managing and monitoring openfire via JMX.</description> <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> <licenseType>Apache 2.0</licenseType>
<date>01/09/2015</date> <date>01/09/2015</date>
<minServerVersion>3.9.9</minServerVersion> <minServerVersion>3.9.9</minServerVersion>
......
...@@ -143,17 +143,25 @@ public class JmxWebPlugin implements Plugin { ...@@ -143,17 +143,25 @@ public class JmxWebPlugin implements Plugin {
public void destroyPlugin() { public void destroyPlugin() {
Log.info( "["+ NAME + "] destroy " + NAME + " plugin resources"); Log.info( "["+ NAME + "] destroy " + NAME + " plugin resources");
database.stop(); if (database != null) {
JmxHelper.unregister(OBJECTNAME_DATABASEPOOL); database.stop();
JmxHelper.unregister(OBJECTNAME_DATABASEPOOL);
}
client.stop(); if (client != null) {
JmxHelper.unregister(OBJECTNAME_CORE_CLIENT_THREADPOOL); client.stop();
JmxHelper.unregister(OBJECTNAME_CORE_CLIENT_THREADPOOL);
}
packetCounter.stop(); if (packetCounter != null) {
JmxHelper.unregister(OBJECTNAME_PACKET_COUNTER); packetCounter.stop();
JmxHelper.unregister(OBJECTNAME_PACKET_COUNTER);
}
openfire.stop(); if (openfire != null) {
JmxHelper.unregister(OBJECTNAME_OPENFIRE); openfire.stop();
JmxHelper.unregister(OBJECTNAME_OPENFIRE);
}
Log.info("["+ NAME + "] plugin fully destroyed."); 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