Java Reference
In-Depth Information
The interface extends the standard ScheduleExecutorService , but it additionally
provides the Trigger feature; the possibility to create a dynamic object, which can decide when
a specific event should be fired (see javax.enterprise.concurrent.Trigger ).
This is used to capture the context of the container; it can then be used while submitting a job to
the executor service.
This is used to create threads by the container. The developer can provide its own thread factory
in order to fulfil specific use cases (for instance, setting specific properties on the created ob-
Instances of these components can be obtained using the JNDI lookup or the @Re-
source injection. The Java EE 7 specification requires that every container provides a
set of default resources that should be injectable without any additional configuration. So,
in WildFly, the easiest way to get your hands on them would be to just type the following
private ManagedExecutorService executorService;
private ManagedScheduledExecutorService
private ContextService contextService;
The aforementioned code snippet is shorthand for a lookup of the default instances, which
are as follows:
private ManagedExecutorService executorService;
You can also find any additional executor services and the configuration of the default
ones in the standalone.xml file (and in other variants of the configuration file). A
part of the relevant subsystem is presented as follows:
Search WWH ::

Custom Search