+ } else if(EventConstants.TOPIC_FAILURE.equals(event.getTopic())) {
+ // If the container timed out waiting for dependencies, we'll destroy it and start it again. This
+ // is indicated via a non-null DEPENDENCIES property containing the missing dependencies. The
+ // default timeout is 5 min and ideally we would set this to infinite but the timeout can only
+ // be set at the bundle level in the manifest - there's no way to set it globally.
+ if(event.getProperty(EventConstants.DEPENDENCIES) != null) {
+ Bundle bundle = (Bundle) event.getProperty(EventConstants.BUNDLE);
+
+ List<Object> paths = findBlueprintPaths(bundle);
+ if(!paths.isEmpty()) {
+ LOG.warn("Blueprint container for bundle {} timed out waiting for dependencies - restarting it",
+ event.getProperty(EventConstants.BUNDLE));
+
+ restartService.restartContainer(bundle, paths);
+ }
+ }