Yogesh Patel
unread,May 2, 2011, 12:55:14 PM5/2/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to GWTEventService
Hi,
We are using GWTEventService in our project for Reverse AJAX. Its
fulfill all our requirement.
Currently we are identifying the possibilities to use GWTEventService
to handle the session time out condition.
We have tried following approach to implement it:-
1. In eventservice.properties :-
# Time to wait at maximum (canceled when an event occurred)
time.waiting.max=30000
# Time to wait at minimum (even when events have already occurred)
time.waiting.min=0
# Time till timeout (when the time is reached, the user will be
removed from listening for events)
time.timeout=1800000
2. In Tomcat:-
<session-timeout>25</session-timeout>
3. We have class which implements HttpSessionListener, and on
sessionDestroyed() we are pushing an Event. Here is the code of it:-
public void sessionDestroyed(HttpSessionEvent sessionEvent) {
String sessionId = sessionEvent.getSession().getId();
System.out.println("Session Destroyed:----"+sessionId);
log.debug("Session Destroyed:----"+sessionId);
if (EventRegistryFactory.getInstance().getEventRegistry()
.isUserRegistered(sessionId)) {
EventRegistryFactory.getInstance().getEventRegistry()
.addEventUserSpecific(sessionId, new SessionTimeoutEvent());
System.out.println("Message Pused:----"+sessionId);
log.debug("Message Pused:----"+sessionId);
}
}
But somehow, its not working.
Is there any inbuilt feature to achieve the same in GWTEventService? I
have gone through 'Timeout-Concept', but I am not sure how it can be
used for session timeout only. Because we want to send an Event as
soon as there is session timeout.
Thanks in advance.