-
Bug
-
Resolution: Fixed
-
P3
-
6
-
None
-
b63
-
generic
-
generic
Certain visible methods in javax.management.StandardMBean, such as getCachedMBeanInfo, are synchronized. Since one of the ways to use this class is to subclass it, this can lead to unexpected deadlocks if the subclass also has synchronized methods or equivalently uses synchronized(this). In the example we have seen, a subclass has a synchronized method that performs a blocking operation. This operation cannot complete until another thread finishes an activity that requires doing mbeanServer.getMBeanInfo. Since getMBeanInfo on a StandardMBean calls getCachedMBeanInfo, which is synchronized, there is a deadlock.