Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlets  RSS feed

 
pavan jahagirdar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We know that Servlet container creates a new thread for each incoming request , that is a thread is created each time service method is invoked...

is there a way to manually kill that thread ?

thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

While a new thread may or may not be created when a request comes in -the servlet container may have a pool of existing threads from which one is used when a request comes in- it would be be a bad idea to mess around with objects that are under the control of the servlet container.

What prompted this question?
 
pavan jahagirdar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to keep the count of the times the service method .... but at the same time i dont want multiple threads being created!!
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See my answer in the other topic where you asked that question; please do not post essentially the same question multiple times.
 
pavan jahagirdar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you sir.. for such a quick response....


i am new to this forum, in future i will surely use descriptive subjects.....


 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!