• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I create a Thread pool as in Web,App severs?.  RSS feed

 
muthubkumaran
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[which means if request is greater than the pool size ,it has to be wait in queue,and released when any request in-line is served]
The problem with thread object is ,it can be called start() only once,if you try to call again ,it will through illegal state exception.So it is not possible to put all the thread object into stack and reuse.
If you put runnable object into stack and manually call run(),there is no concurrent action.
Do any one help me out to create thread pool as similar as in web,app servers.
Thank you,
Muthu kumaran
muthu.kumaran@converge.com
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
your name is not valid as per the Javaranch name conventions. Please refer to the document located here
Regarding your question i think i remember seeing an article in JavaWorld in this regard. Please check up JavaWorld.com for your query.
Thanks
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check up the link here
 
M Arshad
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi muthubkumaran,
I don't know why do you need this exclusive thread pool though the pool is virtually created till the threads are running.
You can any time refer them to be used precisely.
What purpose of your will this solve?
 
sree kov
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi muthu ,
even i am looking for some thing like this .. to implement thread pooling .. please let me know if you could and also the details.
Thanks in advance ,
sree
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!