[concurrency-interest] Detecting Killed Threads and Restarting them automatically

verma.kr at tcs.com verma.kr at tcs.com
Mon Jul 3 07:04:49 EDT 2006


Hi Friends,

        I am new to concurrency field so pardon me for my ignorance.

        I am trying to create a Pool of Threads using 
ScheduledThreadPoolExecutor class as follows:

        ScheduledExecutorService service = new 
ScheduledThreadPoolExecutor(5)
 
        After that i submit 5 tasks each implemeting runnable ..all these 
tasks are supposed to run infinitely in a while loop.

        My doubt is that if at any stage one of the threads is killed due 
to RunTime Exception or some critical error in code being executed, then
        is there a mechanism by which i can detect Thread termination and 
RESTART it. 

        If it can be automatically done that shall be great.

        Please advice.

Thanks And Regards,
Verma Rohit Kumar
Tata Consultancy Services Limited
Mailto: verma.kr at tcs.com
Website: http://www.tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20060703/dfba2669/attachment.html 


More information about the Concurrency-interest mailing list