Hi, if your simulation really requires waiting on server side, you could also have a look at Comet (http://tomcat.apache.org/tomcat-6.0-doc/aio.html). A Comet solution would not block a thread per request while waiting for the timeout condition.
By the way, when using the Http11NioProtocol on a Linux box, you should consider this: http://www.mail-archive.com/users@tomcat.apache.org/msg36968.html -- Matthias -----Original Message----- From: Wang Han [mailto:[EMAIL PROTECTED] Sent: Thursday, April 24, 2008 11:25 AM To: Tomcat Users List Subject: Re: Can we slow down the speed of servlet response ? Hi Chris, Just received the latest version NM software and it works well with Thread.sleep works now. It seems old NM SW bug caused Thread.sleep() failed. the latest NM will send 60 concurrent requests maximum and I configured the "Connector" element as: <Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" enableLookups="true" disableUploadTimeout="true" acceptCount="250" maxThreads="250" connectionTimeout="20000"... Not sure whether it can meet the NM requirement , any suggestion? I just get a Linux box with 1G memory to host my Servlet.Will update you after I finish the test. B.R Han On Fri, Apr 18, 2008 at 7:47 PM, Christopher Schultz <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Han, > > Wang Han wrote: > | I have tried Thread.sleep() in my servlet and it fails. > | My NM app throws exception and can't handle such response.. > > What exception is thrown? I can't see a reason why Thread.sleep wouldn't > work. > > > - -chris > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkgIijwACgkQ9CaO5/Lv0PBFHACfaRiSezHeWHpnaPI/2NRyqGR2 > nZsAn32xEYEJ3VzREBoDaFC3iLZyC7Q3 > =Jnab > -----END PGP SIGNATURE----- > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]