JBoss.org Community Documentation Viewing Lock Information

The EntityLockMonitor MBean service allows one to view basic locking statistics as well as printing out the state of the transaction locking table. To enable this monitor uncomment its configuration in the conf/jboss-service.xml:

<mbean code="org.jboss.monitor.EntityLockMonitor"

The EntityLockMonitor has no configurable attributes. It does have the following read-only attributes:

  • MedianWaitTime : The median value of all times threads had to wait to acquire a lock.

  • AverageContenders : The ratio of the total number of contentions to the sum of all threads that had to wait for a lock.

  • TotalContentions : The total number of threads that had to wait to acquire the transaction lock. This happens when a thread attempts to acquire a lock that is associated with another transaction

  • MaxContenders : The maximum number of threads that were waiting to acquire the transaction lock.

It also has the following operations:

  • clearMonitor : This operation resets the lock monitor state by zeroing all counters.

  • printLockMonitor : This operation prints out a table of all EJB locks that lists the ejbName of the bean, the total time spent waiting for the lock, the count of times the lock was waited on and the number of transactions that timed out waiting for the lock.