Book Image

WildFly Configuration, Deployment, and Administration

Book Image

WildFly Configuration, Deployment, and Administration

Overview of this book

Table of Contents (19 chapters)
WildFly Configuration, Deployment, and Administration Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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" use-transaction-setup...