In Java SE one can use constructs like
ExecutorService es1 = Executors.newSingleThreadExecutor();
ExecutorService es2 = Executors.newFixedThreadPool(10);
to control the number of threads available to the executor service. In Java EE 7 it's possible to inject executor services:
@Resource
private ManagedExecutorService mes;
But how can I control the number of threads available to the managed executor service ? For example, in the application I'm writing, there is an executor service that has to be executed in a single thread. So I can't just let the platform choose its preferred number of threads.