luehe 2003/11/03 13:13:01
Modified: util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java
Log:
Reverted support for maxThreads=1
Revision Changes Path
1.27 +9 -24
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
Index: PoolTcpEndpoint.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- PoolTcpEndpoint.java 30 Oct 2003 21:01:39 -0000 1.26
+++ PoolTcpEndpoint.java 3 Nov 2003 21:13:01 -0000 1.27
@@ -544,7 +544,7 @@
}
}
- public void runIt(Object[] perThrData) {
+ public void runIt(Object perThrData[]) {
// Create per-thread cache
if (endpoint.isRunning()) {
@@ -552,16 +552,11 @@
try {
s = endpoint.acceptSocket();
} finally {
- /*
- * Continue accepting on another thread, unless maxThreads has
- * been set to 1, in which case we have to finish processing
- * this request before we can accept a new request.
- */
- if (endpoint.isRunning() && endpoint.getMaxThreads() > 1) {
+ // Continue accepting on another thread...
+ if (endpoint.isRunning()) {
endpoint.tp.runIt(this);
}
}
-
if (null != s) {
try {
@@ -579,24 +574,19 @@
TcpConnection con = null;
try {
- Object[] localPerThrData = null;
if( usePool ) {
con=(TcpConnection)connectionCache.get();
- if( con == null ) {
+ if( con == null )
con = new TcpConnection();
- }
- localPerThrData = perThrData;
} else {
con = (TcpConnection) perThrData[0];
- localPerThrData = (Object[]) perThrData[1];
+ perThrData = (Object []) perThrData[1];
}
con.setEndpoint(endpoint);
con.setSocket(s);
endpoint.setSocketOptions( s );
- endpoint.getConnectionHandler().processConnection(
- con,
- localPerThrData);
+ endpoint.getConnectionHandler().processConnection(con, perThrData);
} catch (SocketException se) {
endpoint.log.error(
"Remote Host " + s.getInetAddress() +
@@ -620,11 +610,6 @@
}
}
}
-
- if (endpoint.getMaxThreads() == 1) {
- // Ready to accept new request
- runIt(perThrData);
- }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]