File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Number of users restriction Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Websphere
Reply Bookmark "Number of users restriction" Watch "Number of users restriction" New topic
Author

Number of users restriction

JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Hi all,

In a Web-J2EE application deployed on WebSphere, I'm looking for a way to restrict the number of users.

For exemple, if I allow 10 users, I want the 11th who tries to login to be rejected.
Is there any simple way to do that ?

TIA,


/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
Arvind Shukla
Ranch Hand

Joined: Jun 26, 2002
Posts: 38
You can set max in-memory session count property to 10 in web container using admin console. Also inside your entry servlet where you are obtaining session for a successfully authenticatde user, you need to put a check (import this package in your code com.ibm.websphere.servlet.session)
IBMSession sess = (IBMSession) request.getSession();
if(sess.isOverFlow()) throw new ServletException("Maximum number of sessions reached on the server");


Arvind,<br />IBM Certified WAS admin (Test 489, Test 340, Test341)
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Thanks Arvind .

But how can it work on a clustered environment ??
Can I define the max-session for a whole cluster ?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Number of users restriction
 
Similar Threads
JMeter Stress Testing Logic
Get Total session count
Number of Visible Users in WebLogic
user configuration
100000 concurrent users