sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 53050 - http://anonsvn.icesoft.org/repo / icefaces / trunk / icefaces / core / src / com / icesoft / faces / webapp / http / servlet / ThreadBlockingAdaptingServlet.java
Unified Diff View - ThreadBlockingAdaptingServlet.java
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/ThreadBlockingAdaptingServlet.java @ revision 53049
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/ThreadBlockingAdaptingServlet.java @ revision 53050
@@ -47,7 +47,6 @@ public class ThreadBlockingAdaptingServlet implements PseudoServlet {     private static final Log LOG = LogFactory.getLog(ThreadBlockingAdaptingServlet.class); -    private static final int TIMEOUT = 10; // minutes     private Server server;     private Configuration configuration; @@ -87,8 +86,9 @@         }         public void blockUntilRespond() throws InterruptedException { +            long timeout = configuration.getAttributeAsLong("heartbeatInterval", 50000) + configuration.getAttributeAsLong("heartbeatTimeout", 30000);             //Block thread by trying to acquire the semaphore a second time. -            boolean acquired = semaphore.tryAcquire(TIMEOUT, TimeUnit.MINUTES); +            boolean acquired = semaphore.tryAcquire(timeout, TimeUnit.MILLISECONDS);             if (acquired) {                 //Release the semaphore previously acquired.                 semaphore.release(); @@ -98,7 +98,7 @@                         "with ICEfaces ID '" +                         request.getParameter("ice.session") + "' " +                         "from " + request.getRemoteAddr() + " " + -                        "in " + TIMEOUT + " minutes. " + +                        "in " + timeout + " milliseconds. " +                         "Unblocking " +                         "thread '" + Thread.currentThread().getName() + "'.");                 //Release the semaphore; most probably respondWith() method was not invoked.


feed icon

sventon 2.5.1