While in the service() method of a servlet, a secondary thread is spawned to write a long, I/O intensive, log file . If the service() method ends before the secondary thread what would happen now ??? 1) The secondary thread ends when the service() method ends 2) The log file is closed when the service() method ends. 3) The service() method will wait until the secondary thread completes executing 4) The service() method ends but the secondary thread continues until it finishes regards
Dave Van Even
Ranch Hand
Joined: Jul 19, 2001
Posts: 101
posted
0
the when the secondary method is spawned and started it keeps running till someone tells it to end ! SO, It's depending on the implementation of your service() method. I you never end the secondary thread, it will keep running. correct me if I'm wrong... Dave Van Even
Thomas Samimuthu
Greenhorn
Joined: Aug 07, 2001
Posts: 8
posted
0
Actualy any thread will exit when the run() method exits , so it is the programmers responsiblity to design the thread properly. ------------------ Valan