The aim of this manual is to show how useful is the Java Virtual Machine Diagnostics to find the root cause of a thread deadlock in Java.
First of all, it is necessary to create a generator of deadlocks. In this case I’ve made a little web application whose goal is to generate thread deadlocks. The code of this application was downloaded from . The program is very simple as you can see:
Dead lock generator called WebDeadLockV2.0
The thread deadlocks generators is deployed on a Weblogic server. In this case, I am using the Oracle Management Server (OMS) in order to save resources. However, it could be deployed in any other server under the supervision of Oracle Cloud Control.
After deploying the application I sent several requests using this URL:
In order to get an overview of the locks you have to follow these steps:
1. On the left panel you have to select the Java Virtual Machine Pool related to OMS
2. As a result you will see the details about this pool on the right side. The quantity of locks is remarked in red. In this case we can 221 locks. In addition, this problem also is detected by the Admin Console
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.