7/19/2010 9:47:01 AM
Title:
Session mgmt
hi all,
in my app i have set the session out after 12 mins when there is no mouse movement or there is no key pressed from keyboard but still the app is giving a message as session timed out though i am browsing thru the application.
i am using timer in my app.
any sample code would help me on session management..
thanks
Rayan
Points: 700
Posts:0
7/19/2010 10:07:56 AM
Create a timer say 500 msec interval in its interval function
set a variable
time=+=500;
//if time is greater than 12 minutes
if(time>720000){
//end session
}
Now add key and mouse listener to stage which should set time=0; on mouse move or keyboard event occurs.
Timer will reset this way and start counting the time again. If any activity occurs before 12 minutes then the timer will reset
7/19/2010 11:59:26 PM
use a 12 minute timer and reset it on mouseOver or keyboard events. This will make the timer restart from beginning and will only call the complete event function if timer was not reset before 12 minutes. How ever the code by rayan should also work.Let me know if it does not work