title: Support for multiple thread pool in same context
body: <p>In Spring @Async , If i want to have multiple executor pool with different queue capacity - I get the error "Only one AsyncAnnotationBeanPostProcessor may exist within the context".</p>
  
  <p>From the below links I observe that this is not feasible . </p>
  
  <p><a href="https://stackoverflow.com/questions/20017278/only-one-asyncannotationbeanpostprocessor-may-exist-within-the-context">Only one AsyncAnnotationBeanPostProcessor may exist within the context</a></p>
  
  <p><a href="https://stackoverflow.com/questions/5440429/springs-scheduled-error-only-one-asyncannotationbeanpostprocessor-may-exist">Spring&#39;s @Scheduled error : Only one AsyncAnnotationBeanPostProcessor may exist within the context</a></p>
  
  <p><a href="https://stackoverflow.com/questions/17367572/how-to-configure-multiple-threadpooltaskexecutors-within-the-same-application-co">https://stackoverflow.com/questions/17367572/how-to-configure-multiple-threadpooltaskexecutors-within-the-same-application-co</a></p>
  
  <p><a href="http://forum.spring.io/forum/spring-projects/container/79086-multiple-executor-possible" rel="nofollow noreferrer">http://forum.spring.io/forum/spring-projects/container/79086-multiple-executor-possible</a></p>
  
  <p>Is there any alternative ( other than using spring-integration ) </p>
  
  <p>Below is my configuration </p>
  
  <p>My configuration is like below</p>
  
  <pre><code>&lt;!- Executor A --&gt;
  &lt;task:annotation-driven executor="executor_A"/&gt;
  &lt;task:executor id="executor_A" pool-size="100"/&gt;
  
  &lt;!- Executor B --&gt;
  &lt;task:annotation-driven executor="executor_B"/&gt;
  &lt;task:executor id="executor_B" pool-size="100"/&gt;
  </code></pre>
  
  <p>The above two configurations are defined in different xml context files and all are loaded in to same application context</p>
  
  <p>From the source code , I am mapping to the specific executor</p>
  
  <pre><code>@Async("executor_A")
  public void testExecutorA()
  {
  }
  
  
  
  @Async("executor_B")
  public void testExecutorB()
  {
  }
  </code></pre>
  
  <p>When I deploy , I  get the below error </p>
  
  <p>2014-07-22 09:41:26.644 [localhost-startStop-1] ERROR o.s.web.context.ContextLoader U: SC: TX: - Context initialization failed
  org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:/META-INF/domainconfig/*-domain-context.xml]
  Offending resource: ServletContext resource [/WEB-INF/spring/root-context.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Only one AsyncAnnotationBeanPostProcessor may exist within the context.
  Offending resource: URL [jar:file:/D:/tomcat/apache-tomcat-7.0.29/webapps/myapp/WEB-INF/lib/myapp-domain-1.0.0.jar!/META-INF/domainconfig/my-domain-context.xml]</p>
  
  <p>Thanks</p>
  
  <p>Lives</p>