Configuring concurrency
Concurrency utilities is new to WildFly 8. As part of Java EE 7, are aim is to ease the task of multithreading within enterprise applications. Prior to Java EE 7, there was no safe way to create a new thread programmatically in your application.
With the new concurrency utilities, your new threads are now guaranteed to have access to other enterprise services, such as transactions, and security.
The main concurrency components are:
ContextService
ManagedThreadFactory
ManagedExecutorService
ManagedScheduledExecutorService
Configuring the context service
The context service is used to create contextual proxies from existent objects and is configured within the ee
module of WildFly. The following is the default configuration in WildFly:
<subsystem xmlns="urn:jboss:domain:ee:2.0"> .... <concurrent> <context-services> <context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default"...