Re: Can we slow down the speed of servlet response ?

2008-04-29 Thread Wang Han
Hi Reich, Lloyd, Chris, Finally the issue is resolved by enabling APR feature in tomcat. Now the NM can use 40 concurrent threads to talk with 100 simulated devices with 70s delay on each successfully. But I am not very clear yet why I have to use APR instead of NIO connector in the scenario :)

RE: Can we slow down the speed of servlet response ?

2008-04-27 Thread Reich, Matthias
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

Re: Can we slow down the speed of servlet response ?

2008-04-24 Thread Wang Han
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

Re: Can we slow down the speed of servlet response ?

2008-04-24 Thread DIGLLOYD INC
Han, I think you're barking up the wrong tree here--use a Mock Object (a dummy) to stub out your app so it thinks it's calling the Servlet. After you've tested your app working, then revert to actually sending the request to Tomcat. If the Servlet provides real data that must come from

Re: Can we slow down the speed of servlet response ?

2008-04-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lloyd, DIGLLOYD INC wrote: | I think you're barking up the wrong tree here--use a Mock Object (a | dummy) to stub out your app so it thinks it's calling the Servlet. | After you've tested your app working, then revert to actually sending | the

Re: Can we slow down the speed of servlet response ?

2008-04-18 Thread Christopher Schultz
-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

RE: Can we slow down the speed of servlet response ?

2008-04-17 Thread Peter Crowther
From: Wang Han [mailto:[EMAIL PROTECTED] the app sends some request to servlet and will handle the response after 5 minutes. But in the servlet side, it handles the request too fast and always sends response back to app in 30 seconds. So I wonder is there a way to add some delay in tomcat

Re: Can we slow down the speed of servlet response ?

2008-04-17 Thread Benjamin Lerman
To start with, I'd take the naive approach and see whether it worked well enough for the job. I'd use thread.sleep(), and make sure I had enough worker threads (configured in server/conf.xml) to handle the number of outstanding requests you want to generate. That could be many thousands (I

Re: Can we slow down the speed of servlet response ?

2008-04-17 Thread Wang Han
Hi all, Thanks for your interesting suggestion. I have tried Thread.sleep() in my servlet and it fails. My NM app throws exception and can't handle such response.. Will try he other 2 method and see what will happen. B.R Hanks On Thu, Apr 17, 2008 at 3:18 PM, Benjamin Lerman [EMAIL PROTECTED]

Re: Can we slow down the speed of servlet response ?

2008-04-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Han, Wang Han wrote: | But in the servlet side, it handles the request too fast and always | sends response back to app in 30 seconds. Maybe you should get together with the guys who are always asking about how to optimize Tomcat and get their code