aspose file tools*
The moose likes JSP and the fly likes Threads in JSP/Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Threads in JSP/Servlets" Watch "Threads in JSP/Servlets" New topic
Author

Threads in JSP/Servlets

Ritesh Pareek
Ranch Hand

Joined: Nov 04, 2008
Posts: 50
Hi All,

I am having a problem while Using Timer class in jsp (of course due to my misconceptions). Scenario is


Starting Timer thread from jsp like this



This is my Scheduler class



And here is my SynWithMyWorldSch.java



My questions are:

1. I need to create a system of starting/stoping scheduler in such a way so that it should not bound with particular session, once someone logged-in runscheduler and than gone away for years and than come back and logged in to stop scheduler.
2. Basically this point is also related with the point mentioned above. Whenever we hit server very first ... have to go will edit this post after 2hr
Ritesh Pareek
Ranch Hand

Joined: Nov 04, 2008
Posts: 50
My questions are:

1. I need to create a system of starting/stoping scheduler in such a way so that it should not bound with particular session, once someone logged-in runscheduler and than gone away for years and than come back and logged in to stop scheduler.
2. Basically this point is also related with the point mentioned above. When a servlet thread start a new thread into it, and than logged out, Will new thread killed or not? If not, than If i call isRunning() what will it return.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Threads in JSP/Servlets