in src/main/java/org/apache/sling/feature/launcher/impl/launchers/AbstractRunner.java [243:271]
protected boolean startFramework(final Framework framework, long timeout, TimeUnit unit) throws BundleException, InterruptedException {
Executor executor = Executors.newSingleThreadExecutor();
Future<Void> result = ((ExecutorService) executor).submit(new Callable<Void>()
{
@Override
public Void call() throws Exception
{
framework.start();
return null;
}
});
try {
result.get(timeout, unit);
return true;
} catch (TimeoutException ex) {
return false;
} catch (ExecutionException ex) {
Throwable cause = ex.getCause();
if (cause instanceof BundleException) {
throw (BundleException) cause;
} else {
throw (RuntimeException) cause;
}
}
finally {
((ExecutorService) executor).shutdownNow();
}
}