wip: removing ajp support
This commit is contained in:
parent
43cc3ca243
commit
5f68f40579
1 changed files with 17 additions and 17 deletions
|
@ -18,8 +18,8 @@ package helma.main;
|
||||||
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Connector;
|
import org.eclipse.jetty.server.Connector;
|
||||||
import org.eclipse.jetty.ajp.Ajp13SocketConnector;
|
//import org.eclipse.jetty.ajp.Ajp13SocketConnector;
|
||||||
import org.eclipse.jetty.server.bio.SocketConnector;
|
//import org.eclipse.jetty.server.bio.SocketConnector;
|
||||||
import org.eclipse.jetty.server.nio.SelectChannelConnector;
|
import org.eclipse.jetty.server.nio.SelectChannelConnector;
|
||||||
import org.eclipse.jetty.xml.XmlConfiguration;
|
import org.eclipse.jetty.xml.XmlConfiguration;
|
||||||
|
|
||||||
|
@ -34,14 +34,14 @@ public class JettyServer {
|
||||||
protected org.eclipse.jetty.server.Server http;
|
protected org.eclipse.jetty.server.Server http;
|
||||||
|
|
||||||
// the AJP13 Listener, used for connecting from external webserver to servlet via JK
|
// the AJP13 Listener, used for connecting from external webserver to servlet via JK
|
||||||
protected Ajp13SocketConnector ajp13;
|
//protected Ajp13SocketConnector ajp13;
|
||||||
|
|
||||||
public static JettyServer init(Server server, ServerConfig config) throws IOException {
|
public static JettyServer init(Server server, ServerConfig config) throws IOException {
|
||||||
File configFile = config.getConfigFile();
|
File configFile = config.getConfigFile();
|
||||||
if (configFile != null && configFile.exists()) {
|
if (configFile != null && configFile.exists()) {
|
||||||
return new JettyServer(configFile.toURI().toURL());
|
return new JettyServer(configFile.toURI().toURL());
|
||||||
} else if (config.hasWebsrvPort() || config.hasAjp13Port()) {
|
} else if (config.hasWebsrvPort()/* || config.hasAjp13Port()*/) {
|
||||||
return new JettyServer(config.getWebsrvPort(), config.getAjp13Port(), server);
|
return new JettyServer(config.getWebsrvPort()/*, config.getAjp13Port()*/, server);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -61,28 +61,28 @@ public class JettyServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private JettyServer(InetSocketAddress webPort, InetSocketAddress ajpPort, Server server)
|
private JettyServer(InetSocketAddress webPort/*, InetSocketAddress ajpPort*/, Server server)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
http = new org.eclipse.jetty.server.Server();
|
http = new org.eclipse.jetty.server.Server();
|
||||||
http.setServer(http);
|
http.setServer(http);
|
||||||
|
|
||||||
// start embedded web server if port is specified
|
// start embedded web server if port is specified
|
||||||
if (webPort != null) {
|
if (webPort != null) {
|
||||||
Connector conn = new SelectChannelConnector();
|
Connector conn = new SelectChannelConnector();
|
||||||
conn.setHost(webPort.getAddress().getHostAddress());
|
conn.setHost(webPort.getAddress().getHostAddress());
|
||||||
conn.setPort(webPort.getPort());
|
conn.setPort(webPort.getPort());
|
||||||
|
|
||||||
http.addConnector(conn);
|
http.addConnector(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
// activate the ajp13-listener
|
/*// activate the ajp13-listener
|
||||||
if (ajpPort != null) {
|
if (ajpPort != null) {
|
||||||
// create AJP13Listener
|
// create AJP13Listener
|
||||||
ajp13 = new Ajp13SocketConnector();
|
ajp13 = new Ajp13SocketConnector();
|
||||||
ajp13.setHost(ajpPort.getAddress().getHostAddress());
|
ajp13.setHost(ajpPort.getAddress().getHostAddress());
|
||||||
ajp13.setPort(ajpPort.getPort());
|
ajp13.setPort(ajpPort.getPort());
|
||||||
|
|
||||||
http.addConnector(ajp13);
|
http.addConnector(ajp13);
|
||||||
|
|
||||||
// jetty6 does not support protection of AJP13 connections anymore
|
// jetty6 does not support protection of AJP13 connections anymore
|
||||||
|
@ -94,8 +94,8 @@ public class JettyServer {
|
||||||
throw new RuntimeException(message);
|
throw new RuntimeException(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
server.getLogger().info("Starting AJP13-Listener on port " + (ajpPort));
|
server.getLogger().info("Starting AJP13-Listener on port " + (ajpPort));
|
||||||
}
|
}*/
|
||||||
openListeners();
|
openListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,16 +105,16 @@ public class JettyServer {
|
||||||
|
|
||||||
public void start() throws Exception {
|
public void start() throws Exception {
|
||||||
http.start();
|
http.start();
|
||||||
if (ajp13 != null) {
|
/*if (ajp13 != null) {
|
||||||
ajp13.start();
|
ajp13.start();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stop() throws Exception {
|
public void stop() throws Exception {
|
||||||
http.stop();
|
http.stop();
|
||||||
if (ajp13 != null) {
|
/*if (ajp13 != null) {
|
||||||
ajp13.stop();
|
ajp13.stop();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue