users@glassfish.java.net

Re: Unclear definitions of HTTP listener settings

From: <forums_at_java.net>
Date: Thu, 27 Oct 2011 10:29:41 -0500 (CDT)

My servlet code is doing the same as your example. Here is the code that is
executed when the request parameter op=black-hole:

   log.info("Request from {} fell into a black hole",
request.getRemoteUser());
   try {
    Thread.sleep(10* 60 * 60 * 1000);  // 10 h
   }
   catch (InterruptedException e) {
    log.info("thread sleep interrupted");
   }
  
And here's the output in my log file:

2011-10-27 15:28:39.109 INFO  [http-thread-pool-8181(1)]
(AdminServlet.doGet:168) - Request from per fell into a black hole
2011-10-27 15:28:49.109 INFO  [http-thread-pool-8181(1)]
(AdminServlet.doGet:173) - thread sleep interrupted
2011-10-27 15:28:49.109 INFO  [http-thread-pool-8181(4)]
(AdminServlet.doGet:168) - Request from per fell into a black hole
2011-10-27 15:28:59.125 INFO  [http-thread-pool-8181(4)]
(AdminServlet.doGet:173) - thread sleep interrupted
2011-10-27 15:28:59.125 INFO  [http-thread-pool-8181(6)]
(AdminServlet.doGet:168) - Request from per fell into a black hole
2011-10-27 15:29:09.125 INFO  [http-thread-pool-8181(6)]
(AdminServlet.doGet:173) - thread sleep interrupted
2011-10-27 15:29:09.125 INFO  [http-thread-pool-8181(3)]
(AdminServlet.doGet:168) - Request from per fell into a black hole
2011-10-27 15:29:19.125 INFO  [http-thread-pool-8181(3)]
(AdminServlet.doGet:173) - thread sleep interrupted

Does that help?

 


--
[Message sent by forum member 'tmpsa']
View Post: http://forums.java.net/node/855551