description="Maximum number of Keep-Alive requests to honor per connection"
type="int"/>
- <attribute name="keepAliveTimeout"
- description="The number of seconds Tomcat will wait for a subsequent request before closing the connection"
- type="int"/>
-
<attribute name="maxPostSize"
description="Maximum size in bytes of a POST which will be handled by the servlet API provided features"
type="int"/>
source =
new InputSource("file://" + file.getAbsolutePath());
stream = new FileInputStream(file);
- context.addWatchedResource(file.getAbsolutePath());
}
} catch (Exception e) {
log.error(sm.getString("contextConfig.defaultMissing")
cHandler = new AjpConnectionHandler(this);
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
- setKeepAliveTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
}
setAttribute("soTimeout", "" + i);
}
- public int getKeepAliveTimeout() {
- return ep.getKeepAliveTimeout();
- }
-
-
- public void setKeepAliveTimeout( int i ) {
- ep.setKeepAliveTimeout(i);
- setAttribute("keepAliveTimeout", "" + i);
- }
public void setRequiredSecret(String requiredSecret) {
this.requiredSecret = requiredSecret;
*/
protected int maxKeepAliveRequests = -1;
+
/**
* SSL enabled ?
*/
return maxKeepAliveRequests;
}
+
/**
* Set the maximum size of a POST which will be buffered in SSL mode.
*/
cHandler = new Http11ConnectionHandler( this );
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
- setKeepAliveTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
}
}
/**
- * The number of seconds Tomcat will wait for a subsequent request
- * before closing the connection. The default is the same as for
- * Apache HTTP Server (15 000 milliseconds).
- */
- public int getKeepAliveTimeout() {
- return ep.getKeepAliveTimeout();
- }
-
- public void setKeepAliveTimeout(int timeout) {
- ep.setKeepAliveTimeout(timeout);
- }
-
- /**
* Return the Keep-Alive policy for the connection.
*/
public boolean getKeepAlive() {
return maxKeepAliveRequests;
}
+
/**
* Set the maximum size of a POST which will be buffered in SSL mode.
*/
public int getMaxKeepAliveRequests() { return maxKeepAliveRequests; }
public void setMaxKeepAliveRequests(int mkar) { maxKeepAliveRequests = mkar; }
+
// HTTP
/**
* This timeout represents the socket timeout which will be used while
out.printil("out = _jspx_out;");
out.printil("if (out != null && out.getBufferSize() != 0)");
out.pushIndent();
- out.printil("try { out.clearBuffer(); } catch (java.io.IOException e) {}");
+ out.printil("out.clearBuffer();");
out.popIndent();
out
/**
- * Keep-Alive timeout.
- */
- protected int keepAliveTimeout = -1;
- public int getKeepAliveTimeout() { return keepAliveTimeout; }
- public void setKeepAliveTimeout(int timeout) { keepAliveTimeout = timeout; }
-
-
- /**
* Timeout on first request read before going to the poller, in ms.
*/
protected int firstReadTimeout = -1;
protected void init() {
pool = Pool.create(serverSockPool);
int size = pollerSize / pollerThreadCount;
- int timeout = keepAliveTimeout;
+ int timeout = soTimeout;
if (comet) {
// FIXME: Find an appropriate timeout value, for now, "longer than usual"
// semms appropriate
- timeout = keepAliveTimeout * 50;
+ timeout = soTimeout * 50;
}
serverPollset = allocatePoller(size, pool, timeout);
if (serverPollset == 0 && size > 1024) {