Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 84194 invoked by uid 500); 7 Aug 2001 22:26:00 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 84161 invoked from network); 7 Aug 2001 22:26:00 -0000 Date: Tue, 07 Aug 2001 15:25:18 -0700 From: Vishy Kasar Subject: Addition of 'dirty' field to Session interface Sender: vkasar@borland.com To: tomcat-dev@jakarta.apache.org Cc: craigmcc@apache.org, vkasar@borland.com Message-id: <3B706ACD.E3EA6801@borland.com> Organization: Borland MIME-version: 1.0 X-Mailer: Mozilla 4.5 [en] (X11; I; SunOS 5.6 sun4u) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi, In order to support persistent failover, we have written our own Store class that writes session data to DB of our choice. We decided to use maxIdleBackups as that will save the data periodically to disk without getting rid of it in memory. PersistentManagerBase.processMaxIdleBackups() writes the session data to DB at periodical intervals irrespective of session has changed or not. I think it will be very valuable addition to add getDirty() and setDirty(boolean) methods to the Session interface. When PersistentManagerBase saves the session contents, it can set dirty bit to false and from then onwards save the session only if the bit is set to true. Selected setXXX methods in StandardSession will set the dirty bit to true indicating that Session data has changed and it needs to be saved in the next save cycle by PersistentManager. Let me know what you guys think of this useful optimization. I can contribute the code if necessary. -- Cheers!