Originally posted by Abhishek Asthana:
What kind of a timer are you talking? Please specify. And how to make such a timer?
Hi
I think what you're looking for is a TimerTask - see the
Java API java.util.Timer and java.util.TimerTask - a good example is at:
http://javaalmanac.com/egs/java.util/ScheduleLater.html. Then it's simply a case of doing
at the appropriate time - inside the timer. I'll leave how to attach the timer
thread to the session for you to work out
Not really for me to ask - but why would you want to kill a client that's been logged on for an hour. Don't think they'd apprechiate it much! What if they are in the middle of something which involves putting data in the session - are you just going to loose that data? Are you going to tell the user what's happened?
Cheers,
Gray