In case you weren't aware of it, you can register a "shutdown handler" using self.application().addShutDownHandler(func). You could write a function that pickles your dictionary to disk and register it as a shutdown handler.
- Geoff > -----Original Message----- > From: Roger Haase [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 02, 2003 12:31 PM > To: Webware discuss > Subject: [Webware-discuss] HowTo Restart AppServer and > Preserve Session > Based Locks > > > I currently use my SitePage module to hold a shared MiddleKit > store and > a dictionary which I use as a lock holder for active users who are > editing a logical section of a MySQL database. > > I would like to be able to restart the AppServer: > - from a servlet as discussed in another thread recently > - automatically by updating a module > - from the console > > How can I save and restore my dictionary lock holder under all of the > above instances? Or is there a better technique I could use (like a > MySQL table or file instead of a dictionary in SitePage)? > > Using a file or table would be an easy fix, but I currently detect > timed out users by maintaining a last accessed time in the lock > dictionary and clearing timed out users whenever a new user tries to > obtain a lock. Maintaining the last access time would require > rewriting > the file/table with each incoming transaction. Is there a > better way to > detect and remove a timed out user? > > Roger Haase > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - forms, calculators, tips, more > http://taxes.yahoo.com/ > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Webware-discuss mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webware-discuss > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss