• Post Reply Bookmark Topic Watch Topic
  • New Topic

Threads in Servlets  RSS feed

 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai All!
Is there any way to keep thread running even after program that created thread exits? In precise , i want to start a thread in a service method of servlet and it should run even after session expires!
ASAP! anuy help is appreciable!
from
Manohar
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean "after the program exits" ?
A servlet engine keeps running after a single request / response cycle. There is nothing to stop you starting any number of Threads from the service method, just like any other Java application.
Exactly what are you going to be doing in the Thread(s)?
Bill

------------------
author of:
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!