+
+// // Start the framework level after level
+// int currentStartLevel = frameworkStartLevel.getStartLevel();
+// stages: for (int stage = currentStartLevel + 1; stage <= activeStartLevel; stage++) {
+// if (OsgiBootUtils.isDebug())
+// OsgiBootUtils.debug("Starting stage " + stage + "...");
+// final int nextStage = stage;
+// final CompletableFuture<FrameworkEvent> stageCompleted = new CompletableFuture<>();
+// frameworkStartLevel.setStartLevel(nextStage, (FrameworkEvent event) -> {
+// stageCompleted.complete(event);
+// });
+// FrameworkEvent event;
+// try {
+// event = stageCompleted.get();
+// } catch (InterruptedException | ExecutionException e) {
+// throw new IllegalStateException("Cannot continue start", e);
+// }
+// if (event.getThrowable() != null) {
+// OsgiBootUtils.error("Stage " + nextStage + " failed, aborting start.", event.getThrowable());
+// break stages;
+// }
+// }