public final void beforeRun() throws Exception {
callable = getCallable();
ManagedContext managedContext = getManagedContext();
if (callable instanceof RunnableAdapter) {
RunnableAdapter adapter = (RunnableAdapter) callable;
Runnable runnable = (Runnable) managedContext.initialize(adapter.getRunnable());
adapter.setRunnable(runnable);
} else {
callable = (Callable) managedContext.initialize(callable);
}
}