I have definded N servlets on my web.xml which use the same Servlet class. Each of my servlets has different configurations which I configure through servlet init parameters and applying different filters to each of them.
I am experiencing the following problem: I can only access two of my servlets at the same time. Acesses to the third, fourth and others get blocked until one of the servlets is free/avalilable.
For instance: I have servlet a, b, c and d (all defined on web.xml with class example.Servlet). Each servlet is mapped to a different url, say a, b, c and d. If I make an access to servlet a and another to servlet b everything works fine. If I access servlet c or d while accesses to a or b haven't finished, I get blocked. The request will only proceed when servlet a or b become avaliable:
If I make the requests below ordered, the third request will only be processed after the first or the second has finished.
The concurrency problem is only related with different servlets/mappings. I can make N concurrent accesses to each servlet (as long as I only access two different ones at the same time).
I have experienced this behavior with:
JBoss-4.0.0 (build: CVSTag=JBoss_4_0_0 date=200409200418) with Tomcat-5.0.28
JBoss 3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445) with Tomcat-4.1.29
Has any one experienced this? How can I avoid this behavior?
Thanks in advance,