Book Image

WildFly Performance Tuning

Book Image

WildFly Performance Tuning

Overview of this book

Table of Contents (17 chapters)
WildFly Performance Tuning
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Buying a new suit isn't easy. Hopefully, you know why you need one. There might be a certain occasion, such as a wedding or party, or perhaps you just need to look sharper at work. Whatever the reason, there are likely to be some inherent requirements. Cloth, colors, patterns, the cut and the placement as well as the number of buttons are examples of factors that will all depend on environment and time of usage. The thoughtful buyer will take all of these factors, and possibly more, into consideration before making a selection.

Getting something cheap can be acceptable and cost-effective in the short run. For longer commitments, however, it will certainly be more financially viable (and probably more aesthetically preferable) to get the quality of a well-designed, tailored fit, especially as this might even be customizable as your needs (size) change.

Should you need to sit a lot in your precious garment, it would be wise to double up with at least an extra pair of pants. When wear and tear, or some other reason, makes you drop a pair, it is good to quickly have another on standby.

Get the requirements sorted, find the right design, try it out, and tune it to fit new needs when needed. If you find a wrinkle, make sure to iron it out and try it on again. That is what you must do during the lifecycle of a suit and an IT system alike.

Let's go and get dressed for success with WildFly!

What this book covers

Chapter 1, The Science of Performance Tuning, talks about what performance tuning is all about and how it can be applied within an organization.

Chapter 2, Tools of the Tuning Trade, introduces some useful Open Source tools to use when performance tuning anything covered in this book.

Chapter 3, Tuning the Java Virtual Machine, covers what the engine of Java is and how to tune it as well as all other Java-based applications.

Chapter 4, Tuning WildFly, explains what can be tuned in the WildFly Application Server.

Chapter 5, EJB Tuning in WildFly, talks about how Enterprise JavaBeans can be tuned.

Chapter 6, Tuning the Persistence Layer, covers how to design an effective database as well as how to tune JPA and queries.

Chapter 7, Tuning the Web Container in WildFly, explores Undertow—the blazingly fast, new web container in WildFly—and discusses how it can be tuned to become even better.

Chapter 8, Tuning Web Applications and Services, covers numerous tuning tricks and tips surrounding the web applications and services based on Java EE.

Chapter 9, JMS and HornetQ, explains how JMS works and can be tuned in HornetQ, the JMS provider of WildFly.

Chapter 10, WildFly Clustering, explores tuning in a clustered WildFly, HornetQ, and Java EE components.

What you need for this book

As a base, it is recommended that you start out with the following platforms and tools:

  • Java SE 7

  • WildFly 8.x (8.0.0.Final is used in the book)

  • VisualVM

  • Apache JMeter

More tools have been introduced within the book, but they are considered optional depending on what you are interested in exploring and tuning.

Who this book is for

This book is for anyone interested in what performance tuning is all about and how to do it using Java technologies, the WildFly Application Server, and other Open Source software.

The first chapter should be considered a compulsory read for anyone working anywhere near any form of IT, project and business managers included!

Chapter 2, Tools of the Tuning Trade, and Chapter 3, Tuning the Java Virtual Machine, are very useful for anyone working with Java technologies.

From Chapter 4, Tuning WildFly, and forward, the content in this book turns toward developers and architects that need to tune WildFly and the different layers of the Java EE stack.

The final chapter is for those who (think they) need to cluster, and tune their clustered environment.

In general, you will probably need to be a seasoned developer or software architect in order to take in everything from this book. However, the book has been designed so that you, as a reader, can target the area you are interested in, or have a need for, at the moment. The book will grow with you, and you with the book.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "As the JVM runs out of memory, an OutOfMemoryError error will occur."

A block of code or configuration is set as follows:

@MessageDriven(activationConfig = {
  @ActivationConfigProperty(propertyName = "destinationType", 
    propertyValue = "javax.jms.Queue"),
  @ActivationConfigProperty(propertyName = "destination", 
    propertyValue = "queue/testQueue"),
    @ActivationConfigProperty(propertyName = "maxSession", 
    propertyValue = "20"),
  @ActivationConfigProperty(propertyName = "acknowledgeMode", 
    propertyValue = "Auto-acknowledge") })
public class TestMDB implements MessageListener {
  public void onMessage(Message message) {
...
    }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

remote.cluster.ejb.clusternode.selector=RRSelector

Any command-line input or output is written as follows:

/subsystem=ejb3/strict-max-bean-instance-pool=mdb-strict-max-pool:read-attribute(name=max-pool-size)

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Unfortunately, Management Console only provides a configuration view on this pool and not any runtime information."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.