This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread pool of servlet

 
Hariom Tiwari
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there any way to set Thread pool size for a particular/general servlet?
 
Steve Luke
Bartender
Pie
Posts: 4181
21
IntelliJ IDE Java Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably not. This would generally be server dependent. On some servers you would be able to control the total number of simultaneous requests - which would define the thread pool size, or vice versa. But I don't know any that control how many threads can access a single Servlet.

Why do you want to do this?
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure but it looks to me as an application-specific issue.
AFAIK, JEE specification doesn't indicate such a thing.
 
Hariom Tiwari
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just out of curiousity.
I guess there needs to be any such mechanism.In case thousands of requests come for a particular servlet ,wont performance drgrade?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13047
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a mechanism limiting the number of "simultaneous" requests but it is for the servlet container as a whole.

Think about it - the container has to take a request and examine it before it knows which servlet will process it.

Inside the servlet, you can control the number of requests actually being worked on by rejecting excess requests with some sort of message.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic