I have a Web Application which runs in two HTML frames viz. Left.html and Right.html . Left frame contains an applet (HeartbeatApplet) that sends requests to a servlet. It's job is to validate session every 1500 miliseconds.
Right frame contains an applet (ViewerApplet) that displays the current statistics of the server. It sends 8 different requests to servlet continuously ( in a while(true) )and updates UI according to the data received. User can select this refresh rate from a combo box on the applet.
The applet goes to sleep ( Thread.sleep() ) for 'refresh rate' seconds and on waking up sends new requests to servlet.
Everything works fine in our development and testing environment, but is failing on client (customer) site. Now the problem is that this Viewer Applet takes around 30-40 seconds to send the request, even when 'refresh rate'is set 1 second. The Heartbeat applet send request regularly after 1.5 secs without delay.
The behaviuor is strange and Hope we can solve it together. Regards, Bineet
Thank You Dittmer for your interest in the problem. I think the Thread.sleep() is not behaving properly. Once the thread is invoked, it sends and receives response for all the 8 requests in one go. I am putting in more time based loging to exactly catch the piece of code that is taking time. I shall update about the same tommorow when I get back to work. Regards, Bineet.
Hope for the Best, Ready for the Worst
Beware the other head of science - it bites! Nibble on this message:
Free, earth friendly heat - from the CodeRanch trailboss