title: How to get thread state using ThreadPoolTaskExecutor?
body: <p>I'm in the process of modifying some legacy code to use Spring's <code>ThreadPoolTaskExecutor</code>. This application has a parent broker process that fires off threads asynchronously and then monitors their state using getState() calls. Now that the <code>ThreadPoolTaskExecutor</code>'s <code>execute()</code> method is being used to fire off the child threads, <code>getState()</code> always returns "NEW", even after the run() method of the child thread has completed. </p>
  
  <p>One alternative would be to manually maintain a property within the child thread object that provides state information but I was wondering if there was a known method for obtaining thread state when using <code>ThreadPoolTaskExecutor</code>.</p>