Here's my question...
I have a JSP app (page centric design) with user logins.
Every time a user logs in, he/she can modify different things (back end),
but once they log out or close the browser, I want to be able reset all of
the changes made by them.

For example:
1. User logs in
2. User changes a table in the DB
3. User logs out, or leaves the page without logging out <- this part
worries me
4. all of the changes in the DB should be reset to their original state.. or
some other state

Is there a standard way of implementing this?  I can think of some ways, but
I'm afraid that they will fall into the "bad design" category.

Here's what I'm thinking of doing.
Create a singleton object, and store the references to all of the sessions
there (during login process).. Once a session dies, that object will get
notified (somehow.. may be HttpSessionBindingEvent?.. not sure how yet), and
then it'll do whatever it needs to do, reset all of the tables, etc...

am I on the right track? ..or smoking crack?

Thanks in advance,
_Ivan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to