Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 33865 invoked from network); 1 Oct 2006 20:44:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Oct 2006 20:44:56 -0000 Received: (qmail 80394 invoked by uid 500); 1 Oct 2006 20:44:49 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 80369 invoked by uid 500); 1 Oct 2006 20:44:49 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 80358 invoked by uid 500); 1 Oct 2006 20:44:49 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 80355 invoked by uid 99); 1 Oct 2006 20:44:49 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Oct 2006 13:44:49 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=5.0 tests=ALL_TRUSTED,NO_REAL_NAME Received: from [209.237.227.198] ([209.237.227.198:52411] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 16/F6-05102-EB820254 for ; Sun, 01 Oct 2006 13:44:47 -0700 Received: by brutus.apache.org (Postfix, from userid 33) id 4141971430D; Sun, 1 Oct 2006 13:44:40 -0700 (PDT) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 35746] - session manager should be immune to system clock time changes (solution provided) In-Reply-To: X-Bugzilla-Reason: AssignedTo Message-Id: <20061001204440.4141971430D@brutus.apache.org> Date: Sun, 1 Oct 2006 13:44:40 -0700 (PDT) X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35746 ------- Additional Comments From quartz12h@yahoo.com 2006-10-01 13:44 ------- Just to clarify, I proposed 2 ways of avoiding unexpected session expiration. a) on the looping/sleeping thread, detect time shifts and pass it along the stackframes to whichever class wants to know. This is when the looping code know to few about the task to perform, for example if the looping thread doesn't know the job is to assert/expire sessions, but it can pass its knowledge of time and time shifts. That's the piece of code. b) the looping/sleeping thread knows it has to age sessions. Valves or filters (whatever on service()) simply resets the age to 0. Note that if the duration of a sleep/wait could be affected by a system time change, rolling back time 1 hour could lock up a thread for 1 more hour. The old way of expiring session would be just as affected because which ever thread checks for session expiration, it also calls wait/sleep. There is no other jvm primitive to perform such pause. Therefore, the implementation would be just as flawed in the worst case, and fairly expiring session in the best case. - - - As for wait()/sleep() JLS specs (JVM spec doesn't mention it): http://java.sun.com/docs/books/jls/third_edition/html/memory.html#17.8.1 "If this is a timed wait, an internal action removing t from m's wait set that occurs after at least millisecs milliseconds plus nanosecs nanoseconds elapse since the beginning of this wait action." http://java.sun.com/docs/books/jls/third_edition/html/memory.html#17.9 "Thread.sleep causes the currently executing thread to sleep (temporarily cease execution) for the specified duration, subject to the precision and accuracy of system timers and schedulers." -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org