Method getThreadDeadlockCalculable = ThreadDeadlockMonitor.class.getMethod("getThreadDeadlockCalculable");
ThreadDeadlockMonitor threadDeadlockMonitor = new ThreadDeadlockMonitor();
threadDeadlockMonitor.setThreadMXBean(ManagementFactory.getThreadMXBean());
WatchInjector watchInjector = new WatchInjector(this, context);
ThresholdWatch watch = (ThresholdWatch)watchInjector.inject(threadDeadlockDescriptor,
threadDeadlockMonitor,
getThreadDeadlockCalculable);
watch.setThresholdValues(new ThresholdValues(0, 1));
watch.addThresholdListener(new DeadlockedThreadPolicyHandler());
} else {