if (log.isInfoEnabled())
log.info("Adding listener on " + address + ":" + actualPort);
if (!serverLock.isStarted()) {
serverLock.start(actualPort);
}
SocketListener listener = null;
if (contextConfiguration.retrieveProperty(new ContextKey("webServer.protocol")).equals("http")) {
listener = new SocketListener();
log.warn("The server is configured to listen for plain HTTP connections.");
} else {
listener = new CustomJsseListener(keystorePassword);
MsieSslHandler sslHandler = new MsieSslHandler();
sslHandler.setUserAgentSubString("MSIE 5");
listener.setHttpHandler(sslHandler);
}
listener.setPort(actualPort);
listener.setMinThreads(contextConfiguration.retrievePropertyInt(new ContextKey("webServer.minThreads")));
listener.setMaxThreads(contextConfiguration.retrievePropertyInt(new ContextKey("webServer.maxThreads")));
listener.setMaxIdleTimeMs(contextConfiguration.retrievePropertyInt(new ContextKey("webServer.maxIdleTimeMs")));
listener.setHost(address);
listener.setBufferSize(contextConfiguration.retrievePropertyInt(new ContextKey("webServer.bufferSize")));
listener.setBufferReserve(contextConfiguration.retrievePropertyInt(new ContextKey("webServer.bufferReserve")));
listener.setTcpNoDelay(contextConfiguration.retrievePropertyBoolean(new ContextKey("webServer.tcpNoDelay")));
listener.setThreadsPriority(contextConfiguration.retrievePropertyInt(new ContextKey("webServer.threadPriority")));
listeners.add(listener);
listener.setLowResourcePersistTimeMs(contextConfiguration.retrievePropertyInt(new ContextKey(
"webServer.lowResourcePersistTimeMs")));
listener.setPoolName("main");
server.addListener(listener);
}
// Add the context
getBootProgressMonitor().updateMessage("Creating web application");