title: Spring ThreadPoolTaskExecutor only running one thread
body: <p>We are using ThreadPoolExecutor in our JMS consumer and injecting it into a DefaultMessageListenerContainer. I expect this to be running concurrent threads for many messages however our logs show that the thread id won't change.Our logging shows that for different processing of messages, the thread id is always the same at 24. </p>
  
  <p>This is the spring configuration in that scenario:</p>
  
  <pre><code>&lt;bean class="org.springframework.jms.listener.DefaultMessageListenerContainer"       
           p:connectionFactory-ref="cachedConnectionFactory"
           p:destination-ref="formsCRRDestination"
           p:messageListener-ref="formServicePojo"
           p:concurrentConsumers="5"
           p:idleTaskExecutionLimit="1"
           p:maxConcurrentConsumers="25"
           p:taskExecutor-ref="threadPoolExecutor"         
           destroy-method="doShutdown"     
      &gt;   
  
  
   &lt;bean id="threadPoolExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor" &gt;
          &lt;property name="corePoolSize" value="1"/&gt;
          &lt;property name="maxPoolSize" value="15"/&gt;
          &lt;property name="keepAliveSeconds" value="30"/&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>After not injecting the threadPoolExectuor bean into the DefaultMessageListenerContainer, the messages are now being executed in different threads. </p>
  
  <p>This is the resulting configuration: </p>
  
  <pre><code>&lt;bean class="org.springframework.jms.listener.DefaultMessageListenerContainer"       
               p:connectionFactory-ref="cachedConnectionFactory"
               p:destination-ref="formsCRRDestination"
               p:messageListener-ref="formServicePojo"
               p:concurrentConsumers="5"
               p:idleTaskExecutionLimit="1"
               p:maxConcurrentConsumers="25"       
               destroy-method="doShutdown"     
          &gt;   
  </code></pre>
  
  <p>I have tried reading the documentation and I don't understand why this is happening. Any explanation?</p>