I'm curious how long Executor threads live prior to being recycled/replaced/what have you. Is there a way to control this lifecycle?
I'm using ThreadLocal to allocate some resources per thread...and the behavior I'm seeing is that after some period of time, my ThreadLocal<Thing> goes away and needs to be reinitialized. It's implying to me that the thread itself has been recycled. What's making this more confusing is that the thread IDs appear to be getting reused, so logging the thread ID isn't helping (it's probably confusing me more than anything). Anyway, can somebody confirm if Tomcat has explicit deliberate control over the Executor thread lifecycle, and if so, how I might be able to control it? And if not, is there a way to control it? Thanks, Dan