United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 5086470 Add support for java.util.concurrent locks in the lock related facility
5086470 : Add support for java.util.concurrent locks in the lock related facility

Details
Type:
Enhancement
Submit Date:
2004-08-12
Status:
Resolved
Updated Date:
2005-11-21
Project Name:
JDK
Resolved Date:
2005-06-02
Component:
core-svc
OS:
generic
Sub-Component:
java.lang.management
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
6

Related Reports
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
ThreadInfo contains monitor lock information when a thread is blocked or waiting on a monitor.  ThreadMXBean.findMonitorDeadlockedThreads() provides a programmatic way to detect deadlock on demand.  Both provides lock information about the object monitor lock but not java.util.concurrent locks.

Enhance the API / VM support to include java.util.concurrent locks in the lock information.

                                    

Comments
EVALUATION

Will consider for Mustang.

###@###.### 2004-08-12

In Mustang, we provide the monitoring and diagnostic support for java.util.concurrent.locks and also customized synchronizers that are built with any AbstractOwnableSynchronizer frameworks.

We add a few APIs in java.lang.management including:
1. ThreadInfo will report a java.util.concurrent lock/condition that a thread is blocked or waiting on.
2. ThreadMXBean.getAllLockedMonitors method to get a list of all locked object monitors.
3. ThreadMXBean.getAllLockedSynchronizers method to get a list of all locked JSR-166 synchronizers.
4. ThreadMXBean.findDeadlockedThreads method to find deadlocks involving both object monitors as well as JSR-166 synchronizers.

To provide monitoring and diagnostic support for JSR-166 synchronizers, a new abstract class AbstractOwnableSynchronizer is added in java.util.concurrent.locks package.  For any customized synchronizers (not provided by JRE), to enable this monitoring and diagnostic support e.g. to assist users to find out which thread holds the synchronizer or which synchronizer a thread is blocked on, it requires the implementation of customized synchronizers to keep track of the thread exclusively owning the lock.


###@###.### 2005-05-20 23:54:23 GMT
                                     
2005-05-20
SUGGESTED FIX

See attached webrev (HS and SDK changes).
###@###.### 2005-05-20 23:54:23 GMT
                                     
2005-05-20



Hardware and Software, Engineered to Work Together