• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DWR reverse ajax interfering with session-timout

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, not sure if this is the right forum for dwr questions but i'm experimenting with reverse ajax for my project and wanted to implement a push from the server to client when session times out. Currently right now session times out after 1 min for testing. when I enable dwr.engine.setActiveReverseAjax(true) I cant seem to get the session to timout, even if I set max timout in web.xml and on session object.

The existing code implements HttpSessionListener and overides sessionDestroyed. I want to do some dwr stuff when session is destroyed but method does not fire after interval is passed when reverse ajax is enabled. Am I doing something wrong? It was my impression that reverse ajax opens another session and keeps it open. That shouldnt interfere with the session the user is using to browse around the web page correct? Does dwr long lived session trumps any attempt to set a timeout?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure exactly how DWR is implementing its reverse Ajax, but are you sure about the following?

Originally posted by Jim Bassy:
It was my impression that reverse ajax opens another session and keeps it open.


Why would it create a new session? And the phrase "open a session" doesn't really mean much. Are you confusing requests and sessions?

Without knowing any details of the implementation, I might guess that the long-standing connection mechanism used by DWR is keeping the session alive because the session will only start its timeout counter when there is no activity. Any open request(s) will likey count as activity.
[ June 23, 2008: Message edited by: Bear Bibeault ]
 
Jim Bassy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I might have misspoke when I said opens a session. It could be that it sends a new request. I'm looking through the dwr documentation now to see what is going on here. However, I thought if somone used reverse ajax before can shed some light on using session timout with it. You might be right in that the session is being kept alive preventing timeout.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am guessing ReverseAjax == comet == holds a connection open on the server.

Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic