tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject svn commit: r690462 - /tomcat/sandbox/tomcat-lite/test/org/apache/tomcat/test/CoyoteTestHelper.java
Date Sat, 30 Aug 2008 04:49:49 GMT
Author: costin
Date: Fri Aug 29 21:49:49 2008
New Revision: 690462

URL: http://svn.apache.org/viewvc?rev=690462&view=rev
Log:
Set the nio connector explicitely.

Modified:
    tomcat/sandbox/tomcat-lite/test/org/apache/tomcat/test/CoyoteTestHelper.java

Modified: tomcat/sandbox/tomcat-lite/test/org/apache/tomcat/test/CoyoteTestHelper.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/test/org/apache/tomcat/test/CoyoteTestHelper.java?rev=690462&r1=690461&r2=690462&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-lite/test/org/apache/tomcat/test/CoyoteTestHelper.java (original)
+++ tomcat/sandbox/tomcat-lite/test/org/apache/tomcat/test/CoyoteTestHelper.java Fri Aug 29
21:49:49 2008
@@ -39,6 +39,7 @@
 import org.apache.coyote.client.AsyncHttp;
 import org.apache.coyote.client.AsyncHttpPool;
 import org.apache.coyote.client.BlockingHttp;
+import org.apache.coyote.http11.Http11NioProtocol;
 import org.apache.coyote.http11.async.AsyncProtocolHandler;
 import org.apache.juli.JdkLoggerConfig;
 import org.apache.tomcat.lite.TomcatLite;
@@ -167,10 +168,13 @@
                                    CoyoteServer server) {
       server.setPort(port);
       server.setDaemon(daemon);
-      if (testWithNewConnector) {
-          server.setAsyncConnector();
-      } else {
-          server.setNioConnector();
+      if (!testWithNewConnector) {
+          Http11NioProtocol proto = new Http11NioProtocol();
+          proto.setCompression("on");
+          proto.setCompressionMinSize(32);
+          proto.setPort(port);
+          proto.getEndpoint().setDaemon(daemon);
+          server.setConnector(proto);
       }
   }
 
@@ -221,8 +225,6 @@
 
       File f = new File(path + "/build/webapps");
       CoyoteServer server = new CoyoteServer();
-      server.setPort(8080);
-      server.setDaemon(true);
       TomcatLite servlets = new TomcatLite(server);
       
       servlets.init("webapps/ROOT", "/");



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message