Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2010
    Posts
    1
    Rep Power
    0

    Default Single login for a user at a time

    Hi All,
    I want to develop a login module for a sytsem.The requirement in this module would be that a user can login only at once into the sytsem at a time. The moment the user tries to again log in to the system the earlier logged session if still existing should be logged off.

    Is this possible in simple J2EE MVC architecture? If anyone has some soln plz help me on this.

    Thanks in advance

  2. #2
    Cbani is offline Member
    Join Date
    Jan 2010
    Posts
    90
    Rep Power
    0

    Default

    There are various ways to this

    1) one is set some property in the web context for each user
    like create a list and set to the cpontext
    each time an user tries to login check the list whether the same user exist or not
    2) one other way is to use DB; in some user table add some boolean column and check whether the user is logged in or not.

  3. #3
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default

    Doing it on the web server is probably preferable since, if the web server is restarted, at least you won't have to dig around in the db and reset everyone's login.

  4. #4
    Cbani is offline Member
    Join Date
    Jan 2010
    Posts
    90
    Rep Power
    0

    Default

    Doing it on the web server is probably preferable since, if the web server is restarted, at least you won't have to dig around in the db and reset everyone's login.

    I agree to this point if number of users are less..

  5. #5
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default

    Bear in mind that someone simply closing their browser will result in them staying logged on (until the session times out anyway).

Similar Threads

  1. Replies: 2
    Last Post: 05-18-2010, 03:12 PM
  2. To get time as input from user
    By yuvarani in forum New To Java
    Replies: 3
    Last Post: 12-16-2009, 12:19 PM
  3. Replies: 2
    Last Post: 12-23-2008, 06:35 PM
  4. Need help with calculating the time the user...
    By Smirre in forum New To Java
    Replies: 8
    Last Post: 11-20-2008, 01:15 PM
  5. Login user name - for all platforms.
    By Eranga in forum Advanced Java
    Replies: 0
    Last Post: 03-17-2008, 05:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •