ClassLoader loader = impl.getClass().getClassLoader();
/* Load the SLA PolicyHandler and set attributes */
handler = createSLAPolicyHandler(sla, loader);
Method getThreadDeadlockCalculable =
ThreadDeadlockMonitor.class.getMethod("getThreadDeadlockCalculable");
ThreadDeadlockMonitor threadDeadlockMonitor = new ThreadDeadlockMonitor();
if(wDesc.getMBeanServerConnection()!=null) {
ThreadMXBean threadMXBean =
JMXUtil.getPlatformMXBeanProxy(wDesc.getMBeanServerConnection(),
ManagementFactory.THREAD_MXBEAN_NAME,
ThreadMXBean.class);
threadDeadlockMonitor.setThreadMXBean(threadMXBean);
}
watchInjector.inject(wDesc, threadDeadlockMonitor, getThreadDeadlockCalculable);
} catch (Exception e) {
logger.warn("Creating SLAPolicyHandler for SLA [{}]", sla.getIdentifier(), e);