How to limit concurrent login to a J2EE web application

N

ningjun.wang

We have a commercial J2EE web application. Our users pay monthly fee to
get a login. After login, they can search and browse all articles in
our web site. The problem is that some user buy one login id and then
share it to many friends who did not pay. We want to limit the
concurrent login to 5. This means if 5 users login to our site using
the same login id already, no other user can login with the same login
id anymore until some of them logout or close their browser.

This is a very common problems for any commercial web application. Is
there a design pattern or existing framework to deal with this problem?

Ningjun
 
M

Manish Pandit

the same login id already, no other user can login with the same login
id anymore until some of them logout or close their browser.

The problem is not so much about tracking concurrent log-ins, but more
about tracking log-outs. So, in this case, even if 5 users with same
credentials log in and immediately close their browsers, the 6th person
should be able to log in. On the other hand, the server will not
invalidate the 5 sessions unless there is a timeout.

-cheers,
Manish
 
C

Carramba

We have a commercial J2EE web application. Our users pay monthly fee to
get a login. After login, they can search and browse all articles in
our web site. The problem is that some user buy one login id and then
share it to many friends who did not pay. We want to limit the
concurrent login to 5. This means if 5 users login to our site using
the same login id already, no other user can login with the same login
id anymore until some of them logout or close their browser.

This is a very common problems for any commercial web application. Is
there a design pattern or existing framework to deal with this problem?

Ningjun

maybe I don't understand your problem but solution to this is simple :)
if I understand correctly.
why don't you log ip from with user when he/She loggs in and do not
allow any other same user login from elsewhere (other ip or limit to
some sub-class like 192.168.3.*) while the user is on website?

Carra
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top