* ThreadDeadlockDetector
*
* @throws IllegalArgumentException if the ServiceElement parameter is null
*/
public static void setThreadDeadlockDetector(ServiceElement sElem, MBeanServerConnection mbsc) {
WatchDescriptor threadDeadlockDesc = getWatchDescriptor(sElem, ThreadDeadlockMonitor.ID);
if(threadDeadlockDesc == null) {
SLA sla = new SLA(ThreadDeadlockMonitor.ID, 0, 1);
sla.setSlaPolicyHandler(SLAPolicyHandler.class.getName());
threadDeadlockDesc = ThreadDeadlockMonitor.getWatchDescriptor();
threadDeadlockDesc.setMBeanServerConnection(mbsc);
sla.setWatchDescriptors(threadDeadlockDesc);
sElem.getServiceLevelAgreements().addServiceSLA(sla);
} else {
threadDeadlockDesc.setMBeanServerConnection(mbsc);
}
}