Book Image

WildFly: New Features

By : Filippe C Spolti
Book Image

WildFly: New Features

By: Filippe C Spolti

Overview of this book

Table of Contents (13 chapters)
WildFly: New Features
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Garbage Collector and tuning


Garbage collector is an automatic memory manager of the JVM that works by freeing memory blocks that are no longer used by the application. Any object in the heap memory, which cannot be accessed by any active thread, is eligible for garbage collection. This means that the object will be collected so that the garbage collector runs. To help us better understand how the garbage collector works, we'll use a small application that stores the objects in the heap memory. Watching the memory can clearly monitor the implementation of the garbage collector. This application is in the directory used by the previous applications.

We will have to build the WAR to begin the test. Navigate to the directory and compile the application as follows:

[root@wfly_book app3-v01-memory-test]# cd /opt/book_apps/wfly_book/app3-v01-memory-test/
[root@wfly_book app3-v01-memory-test]# mvn install

Perform the application deployment. After the deployment has been completed, access the application...