Hi,
I am not sure if this is a bug, feature, or whatever but I definitely need
some answers here. I ran into some issues when sending a request to a
servlet that executes native code that takes a long time to terminate (I am
talking 10s of seconds here). I am consistently getting a second, sometimes
a third, duplicate request about 6-8 seconds into the execution of the
initial request. After alittle investigation I realized I could replicate
this issue by replacing the code that executes the native code with an
infinitely blocking loop ... while(true). As I said before sometimes I even
get a second duplicate request which has me thinking that this is
unexpected/unintended behavior. Here is a small snippet of code that should
allow you to replicate the issue:
public void doPost(HttpServletRequest request, HttpServletResponse response)
{
System.out.println(request);
while(true);
}
In the interest of full disclosure I have a lot more code than what you see
in the provided snippet and I have not tested the aforementioned code
snippet. I have replicated the issue on a dedicated server and a local VM,
both running CentOS 4.5, Java SE 1.6.0, and Tomcat 6. If this is a feature
is there a way to turn it off? If this is a bug is there a workaround?
Regards,
Mashama
--
"If opportunity doesn't knock, build a door." - Milton Berle
"First they ignore you, then they laugh at you, then they fight you, then
you win." - Mohandas Gandhi
"Live as if you were to die tomorrow. Learn as if you were to live forever."
- Mohandas Gandhi