Hi,
In my application I am working on session management.On session
timeout i want to get all fired events(events that are currently
running in a application) and stop them.
Approach that I have implemented for session management.
There is a timer on web layer which listens to every mouse click.
For every mouse click anywhere in a application it checks the
idleTimeout.if it exceeds the specified time it dispatches
LogOutEvent which hits the service layer and invalidate the
session.At the same time on web layer all the dictionaries that are
stored in ModelLocator are set to null.
Problem:
Suppose user leaves system for a specified time and comes back and
clicks on some button.By clicking on that button it fires a custom
event and at the same time it checks for idleTimeOut.If it exceeds
that time then it dispatches another event i.e Logout event.
Now here two events are dispatched on one click of button.
Logout event will invalidate session on service layer and nullify all
the web dictionaries.At this time if another event which was
dispathced with logout event is accessing some dictionary will throw
a nullpointer exception.
Question:
Is there any way through which I can get all the fired events.With
this on Logout event I can get all those events and Cancel them
manually.
OR
Is there any better approach.
Any thoughts on this will be very helpful for me.
Thanks in advance
Jasbir Singh