Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating threads in tomcat

 
RohitNik Sharma
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am facing the same problem while creating threads in Tomcat.

I have a servlet in which i am calling a timer class which is continuosly running.I am planning to increase these times classes to fasten the process.

Can you please tell me wht overheads it takes if i do so and will it affect the performance of Tomcat.

rohit.sharma@india.birlasoft.com

Rohit
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When creating additional Threads in any servlet container you need to think carefully about the implications of servicing many requests. Creating a new Thread for every request is probably a very bad idea.

Back up a bit and define what timing functions you need to have, then maybe you can get suggestions as to how to implement the functions.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic