org.ow2.jonas.lib.execution
Class RunnableHelper
java.lang.Object
org.ow2.jonas.lib.execution.RunnableHelper
public final class RunnableHelper
- extends Object
Helps to run blocks of code under a controlled environment.
- Author:
- Guillaume Sauthier
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
execute
public static <T> ExecutionResult<T> execute(ClassLoader loader,
IExecution<T> exec)
- Run a code block in the context of a given ClassLoader.
- Type Parameters:
T
- execution result type.- Parameters:
loader
- The ClassLoader
to be used as TCCL.exec
- code block.
- Returns:
- the result of this execution.
getThreadContextClassLader
public static ClassLoader getThreadContextClassLader()
- Returns:
- Return the current
Thread
context ClassLoader
(using a priviledged block).
Copyright © 2010 OW2 Consortium. All Rights Reserved.