Commit 4e5ab48a authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Updated readme.

Monitoring plugin won't start if enterprise is on the file system (as opposed to having to be loaded first).


git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches/openfire_3_5_1@10274 b35dd754-fafc-0310-a699-88a17e54d16e
parent a4dbffcd
......@@ -70,14 +70,6 @@ The plugin will then be automatically deployed. To upgrade to a new version,
copy the new monitoring.jar file over the existing file.
</p>
<p>
Make sure that the enterprise plugin is removed before installing this plugin.
Otherwise the enterprise plugin will rename the monitoring.jar to
monitoring.jar.old thus removing thus plugin. If this happens just stop the
server, remove the enterprise.jar plugin and rename monitoring.jar.old to
monitoring.jar and start the server again.
</p>
<h2>Upgrading from Enterprise</h2>
<p>
......
......@@ -23,6 +23,7 @@ import org.picocontainer.MutablePicoContainer;
import org.picocontainer.defaults.DefaultPicoContainer;
import java.io.File;
import java.io.FileFilter;
/**
* Openfire Monitoring plugin.
......@@ -81,16 +82,23 @@ public class MonitoringPlugin implements Plugin {
public void initializePlugin(PluginManager manager, File pluginDirectory) {
System.out.println("Starting Monitoring Plugin");
// Check that the enterprise plugin is not being used
if (manager.getPlugin("enterprise") != null) {
// Stop loading this plugin since the enterprise is being used
// Check if we Enterprise is installed and stop loading this plugin if found
File pluginDir = new File(JiveGlobals.getHomeDirectory(), "plugins");
File[] jars = pluginDir.listFiles(new FileFilter() {
public boolean accept(File pathname) {
String fileName = pathname.getName().toLowerCase();
return (fileName.equalsIgnoreCase("enterprise.jar"));
}
});
if (jars.length > 0) {
// Do not load this plugin since Enterprise is still installed
System.out.println("Enterprise plugin found. Stopping Monitoring Plugin");
throw new IllegalStateException("This plugin cannot run next to the Enterprise plugin");
}
shuttingDown = false;
// Make sure that the enteprise folder exists under the home directory
// Make sure that the monitoring folder exists under the home directory
File dir = new File(JiveGlobals.getHomeDirectory() +
File.separator + "monitoring");
if (!dir.exists()) {
......
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