Commit bef17ad9 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Refactored use of Jetty, upgraded to latest Jetty release.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6692 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6ab03a8a
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
</not> </not>
</condition> </condition>
<fail if="ant.not.ok" message="Must use Ant 1.6.x or 1.7.x to build Wildfire"/> <fail if="ant.not.ok" message="Must use Ant 1.6.x or 1.7.x to build Wildfire"/>
<fail if="java.not.ok" message="Must use JDK 1.5.x to build Wildfire"/> <fail if="java.not.ok" message="Must use JDK 1.5.x or higher to build Wildfire"/>
<tstamp/> <tstamp/>
<tstamp> <tstamp>
......
Name | Version Name | Version
--------------------------------------------- ---------------------------------------------
ant.jar | Jetty 6.0.1 (1.6.5) ant.jar | Jetty 6.1.0 (1.6.5)
ant-contrib.jar | 1.0b1 ant-contrib.jar | 1.0b1
ant-subdirtask.jar | Revision 1.4 (CVS) ant-subdirtask.jar | Revision 1.4 (CVS)
bouncycastle.jar | JDK 1.5, 134 (bcprov-jdk15-134.jar) bouncycastle.jar | JDK 1.5, 134 (bcprov-jdk15-134.jar)
...@@ -11,10 +11,10 @@ commons-codec.jar | 1.3 ...@@ -11,10 +11,10 @@ commons-codec.jar | 1.3
dom4j.jar | 1.6.1 dom4j.jar | 1.6.1
dbutil.jar | Jive Code, no release version. dbutil.jar | Jive Code, no release version.
hsqldb.jar | 1.8.0.5 hsqldb.jar | 1.8.0.5
jetty.jar | Jetty 6.1.0 SVN SNAPSHOT (11/15/2006) jetty.jar | Jetty 6.1.0
jetty-util.jar | Jetty 6.1.0 SVN SNAPSHOT (11/16/2006) jetty-util.jar | Jetty 6.1.0
jasper-compiler.jar | Jetty 6.0.1 (5.5.15) jasper-compiler.jar | Jetty 6.1.0 (5.5.15)
jasper-runtime.jar | Jetty 6.0.1 (5.5.15) jasper-runtime.jar | Jetty 6.1.0 (5.5.15)
jaxen.jar | 1.1 beta 4 (from DOM4J 1.6.1) jaxen.jar | 1.1 beta 4 (from DOM4J 1.6.1)
junit.jar | 3.8.1 junit.jar | 3.8.1
jdic.jar | 0.9.1 (for windows only) jdic.jar | 0.9.1 (for windows only)
...@@ -27,7 +27,7 @@ mail.jar | 1.4.0 (JavaMail) ...@@ -27,7 +27,7 @@ mail.jar | 1.4.0 (JavaMail)
mysql.jar | 3.1.13 mysql.jar | 3.1.13
pack200task.jar | August 5, 2004 pack200task.jar | August 5, 2004
postgres.jar | 8.1-404 JDBC 3 postgres.jar | 8.1-404 JDBC 3
servlet.jar | Jetty 6.0.1 (2.5) servlet.jar | Jetty 6.1.0 (2.5)
shaj.jar | 0.5 shaj.jar | 0.5
sitemesh.jar | 2.2.1 sitemesh.jar | 2.2.1
standard.jar | Jakarta standard taglib 1.1.2 standard.jar | Jakarta standard taglib 1.1.2
......
...@@ -19,10 +19,7 @@ import org.jivesoftware.wildfire.audit.AuditManager; ...@@ -19,10 +19,7 @@ import org.jivesoftware.wildfire.audit.AuditManager;
import org.jivesoftware.wildfire.audit.spi.AuditManagerImpl; import org.jivesoftware.wildfire.audit.spi.AuditManagerImpl;
import org.jivesoftware.wildfire.commands.AdHocCommandHandler; import org.jivesoftware.wildfire.commands.AdHocCommandHandler;
import org.jivesoftware.wildfire.component.InternalComponentManager; import org.jivesoftware.wildfire.component.InternalComponentManager;
import org.jivesoftware.wildfire.container.Module; import org.jivesoftware.wildfire.container.*;
import org.jivesoftware.wildfire.container.Plugin;
import org.jivesoftware.wildfire.container.PluginListener;
import org.jivesoftware.wildfire.container.PluginManager;
import org.jivesoftware.wildfire.disco.IQDiscoInfoHandler; import org.jivesoftware.wildfire.disco.IQDiscoInfoHandler;
import org.jivesoftware.wildfire.disco.IQDiscoItemsHandler; import org.jivesoftware.wildfire.disco.IQDiscoItemsHandler;
import org.jivesoftware.wildfire.disco.ServerFeaturesProvider; import org.jivesoftware.wildfire.disco.ServerFeaturesProvider;
...@@ -127,7 +124,6 @@ public class XMPPServer { ...@@ -127,7 +124,6 @@ public class XMPPServer {
"org.jivesoftware.wildfire.starter.ServerStarter"; "org.jivesoftware.wildfire.starter.ServerStarter";
private static final String WRAPPER_CLASSNAME = private static final String WRAPPER_CLASSNAME =
"org.tanukisoftware.wrapper.WrapperManager"; "org.tanukisoftware.wrapper.WrapperManager";
private HttpServerManager httpServerManager;
/** /**
* Returns a singleton instance of XMPPServer. * Returns a singleton instance of XMPPServer.
...@@ -297,7 +293,6 @@ public class XMPPServer { ...@@ -297,7 +293,6 @@ public class XMPPServer {
} }
loader = Thread.currentThread().getContextClassLoader(); loader = Thread.currentThread().getContextClassLoader();
httpServerManager = HttpServerManager.getInstance();
initialized = true; initialized = true;
} }
...@@ -352,9 +347,8 @@ public class XMPPServer { ...@@ -352,9 +347,8 @@ public class XMPPServer {
// Otherwise, the page that requested the setup finish won't // Otherwise, the page that requested the setup finish won't
// render properly! // render properly!
Thread.sleep(1000); Thread.sleep(1000);
httpServerManager.shutdown(); ((AdminConsolePlugin) pluginManager.getPlugin("admin")).shutdown();
httpServerManager.startup(); ((AdminConsolePlugin) pluginManager.getPlugin("admin")).startup();
} }
verifyDataSource(); verifyDataSource();
...@@ -408,19 +402,6 @@ public class XMPPServer { ...@@ -408,19 +402,6 @@ public class XMPPServer {
ServerTrafficCounter.initStatistics(); ServerTrafficCounter.initStatistics();
// Load plugins (when in setup mode only the admin console will be loaded) // Load plugins (when in setup mode only the admin console will be loaded)
pluginManager.addPluginListener(new PluginListener() {
public void pluginCreated(String pluginName, Plugin plugin) {
if("admin".equals(pluginName)) {
httpServerManager.startup();
}
}
public void pluginDestroyed(String pluginName, Plugin plugin) {
if ("admin".equals(pluginName)) {
httpServerManager.shutdown();
}
}
});
pluginManager.start(); pluginManager.start();
// Log that the server has been started // Log that the server has been started
...@@ -591,8 +572,8 @@ public class XMPPServer { ...@@ -591,8 +572,8 @@ public class XMPPServer {
// Otherwise, this page won't render properly! // Otherwise, this page won't render properly!
try { try {
Thread.sleep(1000); Thread.sleep(1000);
httpServerManager.shutdown(); ((AdminConsolePlugin) pluginManager.getPlugin("admin")).shutdown();
httpServerManager.startup(); ((AdminConsolePlugin) pluginManager.getPlugin("admin")).startup();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -63,6 +63,11 @@ public final class HttpBindManager { ...@@ -63,6 +63,11 @@ public final class HttpBindManager {
} }
private HttpBindManager() { private HttpBindManager() {
// Configure Jetty logging to a more reasonable default.
System.setProperty("org.mortbay.log.class", "org.jivesoftware.util.log.util.JettyLog");
// JSP 2.0 uses commons-logging, so also override that implementation.
System.setProperty("org.apache.commons.logging.LogFactory", "org.jivesoftware.util.log.util.CommonsLogFactory");
PropertyEventDispatcher.addListener(new HttpServerPropertyListener()); PropertyEventDispatcher.addListener(new HttpServerPropertyListener());
this.httpSessionManager = new HttpSessionManager(); this.httpSessionManager = new HttpSessionManager();
} }
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
<%@ page import="java.util.Enumeration" %> <%@ page import="java.util.Enumeration" %>
<%@ page import="java.util.HashMap" %> <%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %> <%@ page import="java.util.Map" %>
<%@ page import="org.jivesoftware.wildfire.HttpServerManager" %> <%@ page import="org.jivesoftware.wildfire.container.PluginManager" %>
<%@ page import="org.jivesoftware.wildfire.container.AdminConsolePlugin" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
...@@ -84,6 +85,8 @@ ...@@ -84,6 +85,8 @@
} }
} }
} }
PluginManager pluginManager = XMPPServer.getInstance().getPluginManager();
%> %>
<html> <html>
...@@ -93,7 +96,7 @@ ...@@ -93,7 +96,7 @@
</head> </head>
<body> <body>
<% if (HttpServerManager.getInstance().isRestartNeeded()) { %> <% if (((AdminConsolePlugin) pluginManager.getPlugin("admin")).isRestartNeeded()) { %>
<div class="warning"> <div class="warning">
<table cellpadding="0" cellspacing="0" border="0"> <table cellpadding="0" cellspacing="0" border="0">
<tbody> <tbody>
......
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