Someone told me that you shouldn't start your own threads from a webapp running under Tomcat (or any other container, presumably)
Runnable myRunnable = new Runnable() {
public void run() {
System.out.println("I'm running");
}
}
new Thread(myRunnable).start();
Or similarly:
ScheduledThreadPoolExecutor retrySchedulerService = new ScheduledThreadPoolExecutor(3);
retrySchedulerService.schedule(dlrRetryTask, 120, TimeUnit.SECONDS);
Instead of either of the above, you're supposed to request a thread from some pool of threads that Tomcat knows about. Is there any truth to this, or is it utter poppycock?