×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Single Session at a Time

Single Session at a Time

Single Session at a Time

(OP)
Hello All !!!

    What is the best way, performance wise, to ensure, one user can initiate only a single session and if he tries to initiate another session, while logged in, he should get an error page, saying your session is currently active?

    One of the ways I could think of is keeping user login info in context and search through the list before creating a session for him, but it does not seem good, as the number of users can be upto 1000 at a give instance.

    Is there a built in functionality or if some one has implemented such a scenario, it would be of immense help.

Thanks,

Regards,

SwapSawe.

Cheer Up, The worst is yet to Come.

RE: Single Session at a Time

Use a database.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
http://www.primrose.org.uk

RE: Single Session at a Time

Hi

SwapSawe, before implementing, think what will happen if someones browser crash and has to log in again without explicit log out.

Feherke.
http://rootshell.be/~feherke/

RE: Single Session at a Time

(OP)
Dear sedj !!!

      Using a db mighnot be suiting for best performance, as this would involve call to db which may take time, considering number of users (may be 1000).

Dear feherke !!!

      That was really a nice catch you found out. I wonder why did not I think of it.

Thanks to both of you.

Regards,

SwapSawe.

Cheer Up, The worst is yet to Come.

RE: Single Session at a Time

>>>>  Using a db mighnot be suiting for best performance, as this would involve call to db which may take time, considering number of users (may be 1000).

Using a db is a far more sutiable and scalable solution, especially if you have a lot of users. I think, if you used connection pooling, you could achive a login-check procedure in around 200 milliseconds on a decent db.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
http://www.primrose.org.uk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close