Book Image

Java EE 7 Performance Tuning and Optimization

By : Osama Oransa
Book Image

Java EE 7 Performance Tuning and Optimization

By: Osama Oransa

Overview of this book

<p>With the expansion of online enterprise services, the performance of an enterprise application has become a critical issue. Even the smallest change to service availability can severely impact customer satisfaction, which can cause the enterprise to incur huge losses. Performance tuning is a challenging topic that focuses on resolving tough performance issues.</p> <p>In this book, you will explore the art of Java performance tuning from all perspectives using a variety of common tools, while studying many examples.</p> <p>This book covers performance tuning in Java enterprise applications and their optimization in a simple, step-by-step manner. Beginning with the essential concepts of Java, the book covers performance tuning as an art. It then gives you an overview of performance testing and different monitoring tools. It also includes examples of using plenty of tools, both free and paid.</p>
Table of Contents (20 chapters)
Java EE 7 Performance Tuning and Optimization
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using the Java concurrency utilities


The concurrency utilities are important APIs that facilitate the concurrency implementations in the Java applications. We can create the thread pools for execution, use the explicit locking mechanism, use fork or join to distribute the required task, and utilize the concurrency in context managed in the Java Enterprise applications.

For example, creating a thread pool is simple using ExecutorService, where we define the pool size and add all the different threads to that pool; in this way, we can control the execution of all these threads according to the defined pool size.

We need to understand all the available concurrency utilities because one of the performance-improvement techniques is to implement concurrency in certain heavy-processing areas in our application. We will not dissect all these utilities here, instead we will show how to resolve some common tasks using the utilities explained in the next sections.

Creating a thread pool

In Java, we can...