With the number of concurrent users you mean the number of concurrent requests? Are there other servlets/webservices running in this container that should be unaffected by this limit?
If the answers are respectively yes and no the solution seems simple; configure the webcontainer. Tomcat can limit the number of concurrent connections handled by a single http connector (see http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
). By default, a http connector handles a maximum of 40 concurrent requests (set this with maxThreads) and reserves 10 waiting slots (acceptCount) before the connection is refused. The defaults seem to match your requirements pretty close. Similar results can be achieved with Apache as a front-end.
If you want more complicated things you could implement a Servlet Filter that limits the number of concurrent requests it chains (passes through), based on your rules.