title: What is the difference between ManagedExecutorService and ExecutorService in java
body: <p>I have a requirement of submitting task to executor service in my wildfly java ee application.</p>
  
  <p>The current code is as below,</p>
  
  <p><code>ExecutorService jobExecutorService = Executors.newSingleThreadExecutor();</code>
  <code>jobExecutorService.submit(new Task(request));</code></p>
  
  <p>On each request, the same piece of code will run and submit the task for single-threaded executor.</p>
  
  <p>But I am not sure whether the newly constructed thread is managed or is it a correct way of submitting tasks in my java ee application for any async flow.</p>
  
  <p>If I need to start a thread which should be managed by the container, do I need to use ManagedExecutorService or is there any other implementation.</p>
  
  <p>Need some knowledge on this.</p>