• 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

Guest Users

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is their any way (through code ) to clear the guest user sessions? I have a portlet which displays to users the number of new messages they have. Problem is, everytime the portlet is hit 2 guest user sessions are created. At times their are 30 online users and 25 of them are guests. A simple SessionFacade.remove(sessionId) call would be nice, but how do I get the session Id for user guest?

Thank You,

Alan


[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can call SessionFacade.getAllSessions() and check for userId() == SystemGlobals.getIntValue(ConfigKeys.ANONYMOUS_USER_ID)

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rafeal,

Thanks for the reply, unfortunately SessionFacade.getAllSessions() only returns the sessions for the registered user who are logged in. I also tried SessionFacade.getLoggedSessions(), with the same result. If I call SessionFacade.anonymousSize() it returns the correct number of anonymous sessions, but it is only an int showing the number of anonymous sessions. There must be some way of getting the sessionId for anonymous sessions? Or some way to remove all anonymous sessions?

Thanks,

Alan
[originally posted on jforum.net by Anonymous]
 
reply
    Bookmark Topic Watch Topic
  • New Topic