Wondering what would happen in the following circumstance. What I am about to describe has just been set up so looking for a better understanding of what would happen.
1) Access www.website.com/mypage from my personal computer (the website is hosted on a server in some distant land somewhere)
2) 'mypage' maps to MyPageServlet.class
3) This Servlet then calls 'MyPojo.class' in another thread as the full duration of this tasks is ~10hrs.
What would happen if I was to close my browser and my personal computer? Would the additional thread within 'MyPojo.class' stop running? I am guessing not, since once this has started then it has started and needs to finish.
Just wanted to check with the experts since I don't want this process to stop half way through if I turn my computer off :-) (would have been ideal for me to think through this before running the program mind... but hey)
Whether it's a good idea or not is another question. To make sure that the web app is always responsive, I almost always delegate intensive or long processing to a daemon program.
Joined: Sep 30, 2009
Thanks for the quick reply. Good to have it confirmed that it wouldn't have any impact.
As for if it is a good idea or not... at the moment it doesn't harm performance as the web app hasn't got high traffic. As traffic / load increases then I will likely look at placing this long running program on a separate web server (e.g. long-running-program.website.com). Not got experience with the Daemon stuff at the moment, but it is good to know that is an option as well (I'll add it to the reading list :-) )