public static void pushCurrentContext(ExecutionContext executionContext) { getContextStack().add(executionContext); }
public static void pushCurrentContext(ExecutionContext executionContext) { getContextStack().add(executionContext); }
public static ExecutionContext currentExecutionContext() { List stack = getContextStack(); return stack.isEmpty() ? null : (ExecutionContext) stack.get(stack.size() - 1); }
public static ExecutionContext currentExecutionContext() { List stack = getContextStack(); return stack.isEmpty() ? null : (ExecutionContext) stack.get(stack.size() - 1); }
public static void popCurrentContext(ExecutionContext executionContext) { List stack = getContextStack(); int index = stack.lastIndexOf(executionContext); if (index == -1) { log.warn(executionContext + " was not found in thread-local stack;" + " do not access ExecutionContext instances from multiple threads"); } else { if (index < stack.size() - 1) { log.warn(executionContext + " was not popped in reverse push order;" + " make sure you pop every context you push"); } // remove execution context from stack, no matter what stack.remove(index); } }
public static void popCurrentContext(ExecutionContext executionContext) { List stack = getContextStack(); int index = stack.lastIndexOf(executionContext); if (index == -1) { log.warn(executionContext + " was not found in thread-local stack;" + " do not access ExecutionContext instances from multiple threads"); } else { if (index < stack.size() - 1) { log.warn(executionContext + " was not popped in reverse push order;" + " make sure you pop every context you push"); } // remove execution context from stack, no matter what stack.remove(index); } }