Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to avoid multiple session for the same username  RSS feed

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need suggestions on implementing single user login , like My system has a user with a username jdavid and my application should not allow two different sessions for the same username jdavid , can one session peep into all other session
to see if the any has a usernaem jdavid, I am basically looking for some pattern if any available for restricting multiple session for the same username . like jaas or any other security api provides this ?
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can keep track of current sessions in a single web application running on a single application server by implementing an HttpSessionListener: javax.servlet.http.HttpSessionListener
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!