/** * Captures the cells diagnostic context of the calling thread. */ public CDC() { _session = MDC.get(MDC_SESSION); _cell = MDC.get(MDC_CELL); _domain = MDC.get(MDC_DOMAIN); _ndc = NDC.cloneNdc(); }
/** * Execute the given runnable within the context of this CDC. */ public void execute(Runnable r) { String session = MDC.get(MDC_SESSION); String cell = MDC.get(MDC_CELL); String domain = MDC.get(MDC_DOMAIN); NDC ndc = NDC.cloneNdc(); try { apply(); r.run(); } finally { setMdc(MDC_DOMAIN, domain); setMdc(MDC_CELL, cell); setMdc(MDC_SESSION, session); NDC.set(ndc); } }
for(GPlazmaPluginService<T> pluginElement: pluginElements) { ConfigurationItemControl control = pluginElement.getControl(); NDC ndc = NDC.cloneNdc();