tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DIGLLOYD INC <digllo...@diglloyd.com>
Subject Re: Can we slow down the speed of servlet response ?
Date Thu, 24 Apr 2008 16:57:59 GMT
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 the servlet,  
wrap the request on the client side, maintaining a queue of requests  
and responses *on the client side*.  Make your app use this client- 
side facility, and have that facility insert the delay when in test  
mode.

Lloyd

On Apr 16, 2008, at 6:24 PM, Wang Han wrote:

> Hi all,
>
> The story is:
>                              http
> NM app  <-------->   servlet
>
> 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 to slow down
> the speed of response?
>
> I know invoking thread.sleep() in servlet is not recommend , so any
> other way please?
>
> B.R
> Han
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message