I have an app where i need to record key user stats, which are updated by certain struts actions. The problem is that i want to keep these in the session, and then only save them to the database when the session is either invalidated through logout, or when it times out and is removed by the server. It doesnt matter if some stats are lost through crashes, server restarts, etc.
I cant see an obvious way to find out when sessions are destroyed. Would it be possible to have a class called stats, which is put into the session, and override the finalize method, so that this writes to the database the calls super.finalize? Would this work? If i make this serializable, what happens if the server decides to remove this session after writing to disk - does it just delete the file, or does it reserialize it and call finalize? Thanks, Daniel. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]