Quick Question: Is there a way to test if a user has an active session

23 views
Skip to first unread message

Gianna Giavelli

unread,
May 20, 2015, 4:54:13 AM5/20/15
to acti...@googlegroups.com

I want to show a list of friends, and if they are on-line (which equates to, do they have an active activeweb login session)

Any way of doing?

Igor Polevoy

unread,
May 20, 2015, 11:04:29 PM5/20/15
to acti...@googlegroups.com
Gianna, when your users login, you can collect them into some table. 
When users logout, you will remove  them from that table. 

You will also need to implement and configure HttpSessionListener in  your web.xml to get events in case a session expires (user walked away )

None of this is specific to JavaLite. 

tx. 

Josh Kamau

unread,
May 21, 2015, 7:18:38 AM5/21/15
to acti...@googlegroups.com
On the same note,  If i dont use the Session object and use only cookies, Is my application completely stateles? (Its not tied to any instance and any request can be handled by any application instance without things like 'Sticky sessions' )

Thanks

--
--
You received this message because you are subscribed to the Google
Groups "ActiveWeb Group" group.
To post to this group, send email to acti...@googlegroups.com
To unsubscribe from this group, send email to
activeweb+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/activeweb?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "ActiveWeb Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to activeweb+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Igor Polevoy

unread,
May 21, 2015, 9:48:23 PM5/21/15
to acti...@googlegroups.com, joshn...@gmail.com
If you are using sticky sessions, then the web server (Nginx, Apache, etc) will be pinning a specific session cookie generated by Java container to a specific node. 
If you completely disable session management in Java container, you can then pin a browse IP address to a node. 

Frankly, discussions about these things are a moot point till you grow to the size of Twitter. In all our projects we used a small user object stored in the session and a sticky session load balancing, and we never ran into performance issues with this. I built apps that served up to a few hundred thousand visitors per day.

tx



On Thursday, May 21, 2015 at 6:18:38 AM UTC-5, Josh Kamau wrote:
On the same note,  If i dont use the Session object and use only cookies, Is my application completely stateles? (Its not tied to any instance and any request can be handled by any application instance without things like 'Sticky sessions' )

Thanks
On Thu, May 21, 2015 at 6:04 AM, Igor Polevoy <ig...@expresspigeon.com> wrote:
Gianna, when your users login, you can collect them into some table. 
When users logout, you will remove  them from that table. 

You will also need to implement and configure HttpSessionListener in  your web.xml to get events in case a session expires (user walked away )

None of this is specific to JavaLite. 

tx. 


On Wednesday, May 20, 2015 at 3:54:13 AM UTC-5, Gianna Giavelli wrote:

I want to show a list of friends, and if they are on-line (which equates to, do they have an active activeweb login session)

Any way of doing?

--
--
You received this message because you are subscribed to the Google
Groups "ActiveWeb Group" group.
To post to this group, send email to acti...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/activeweb?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "ActiveWeb Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to activeweb+unsubscribe@googlegroups.com.

Gianna Giavelli

unread,
May 22, 2015, 3:59:46 AM5/22/15
to acti...@googlegroups.com
OK that's clear thanks. Just checking if there was a function. 
Reply all
Reply to author
Forward
0 new messages