Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Knowing if user session is still "connected"

Status
Not open for further replies.

BPetro

Programmer
Oct 1, 2002
59
US
Has anyone done work to keep a 'heartbeat' to know that a user is still around on the web site? I'm thinking I can popup a small window that can sit in the background or be useful for other purposes and have that window do automatic refreshes which get passed on to a database lastHeartbeatDateTime field. Each user is logged in so we know who 'owns' the session. A user would be considered 'connected' if their last 'heartbeat' was recent. It's not exact but it seems like a fair approximation to session control for a stateless session.

Any other ideas? Any better way? The big picture would be things like a display a list of co-members who are actively online. Any ideas of the best way to do this? Would anyone suggest some java applets or such instead?

Thanks!
 
A popup window would be considered intrusive. If I saw one trying to monitor my "activity" I would close the window and probably never visit the site again. Same for applets trying to do the same thing.
Stop trying to gather information on people !!!

You can achieve your "active logged in users" functionality by implementing a session listener and incrementing/decrementing a JVM static global int :


--------------------------------------------------
Free Database Connection Pooling Software
 
Wow! That sounds like what I wanted - thanks. PS: No I wasn't trying to gather anything about people. Just a way to let a group of people interact better. I'll read up on this as it looks like a good fit. Thanks Sedj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top