+
+ /**
+ * Unregisters the ExecutionContext for the current Thread
+ * @throws a SlcException if no ExecutionContext was registered for the Thread
+ * @return the unregistered ExecutionContext
+ */
+ public static ExecutionContext unregisterExecutionContext() {
+ ExecutionContext current = executionContext.get();
+ if(current == null) {
+ throw new SlcException("No Context registered.");
+ }
+ executionContext.remove();
+ return current;
+ }