title: Have multiple managedExecutor
body: <p>I am trying to add a new ManagedExecutor but I always get an IllegalStateException:</p>
  <pre><code>java.lang.IllegalStateException: Cannot use the same context in more than one of propagated ([Remaining]), cleared ([Remaining]), unchanged ([])
  </code></pre>
  <p>I originally had the following code:</p>
  <pre><code>@Path(&quot;...&quot;)
  @ApplicationScoped
  public class ClassA {
      @Inject
      @ManagedExecutorConfig(maxAsync = 1, maxQueued = 1, cleared = ThreadContext.ALL_REMAINING)
      private ManagedExecutor managedExecutor;
  
      ...
  
      @GET
      @Path(&quot;pathA&quot;)
      @Produces(MediaType.APPLICATION_JSON)
      public void methodA() {
          CompletableFuture.runAsync(()-&gt; {
              try {
                  serviceA.start();
              } catch (IOException|InterruptedException e) {
                  LOGGER.error(&quot;N/A&quot;, e.getMessage(), e);
              }
          }, managedExecutor);
          ;
      }
  </code></pre>
  <p>And I needed a executor for another class, so I tried adding one the same way, but it fails with the IllegalStateException:</p>
  <pre><code>@Path(&quot;...&quot;)
  @ApplicationScoped
  public class ClassB {
      @Inject
      @ManagedExecutorConfig(maxAsync = 1, maxQueued = 1, cleared = ThreadContext.ALL_REMAINING)
      private ManagedExecutor managedExecutor;
  
      ...
  
      @GET
      @Path(&quot;pathB&quot;)
      @Produces(MediaType.APPLICATION_JSON)
      public void methodB() {
          CompletableFuture.runAsync(()-&gt; {
              try {
                  serviceB.start();
              } catch (IOException|InterruptedException e) {
                  LOGGER.error(&quot;N/A&quot;, e.getMessage(), e);
              }
          }, managedExecutor);
          ;
      }
  </code></pre>
  <p>I also tried naming them with:</p>
  <pre><code>    @Inject
      @ManagedExecutorConfig(maxAsync = 30, maxQueued = 300, cleared = ThreadContext.ALL_REMAINING)
      @NamedInstance(&quot;myExecutor&quot;)
      private ManagedExecutor managedExecutor;
  </code></pre>
  <p>But same exception. I tried to set the ThreadContext of classA as ThreadContext.APPLICATION and the ThreadContext of ClassB as ThreadContext.ALL_REMAINING, but same exception too.</p>
  <p>How can I have the two managedExecutors?</p>