You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2012/08/17 16:34:43 UTC
svn commit: r1374289 -
/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/RestartActiveBundlesTask.java
Author: bdelacretaz
Date: Fri Aug 17 14:34:43 2012
New Revision: 1374289
URL: http://svn.apache.org/viewvc?rev=1374289&view=rev
Log:
some DEBUG logs for RestartActiveBundlesTask
Modified:
sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/RestartActiveBundlesTask.java
Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/RestartActiveBundlesTask.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/RestartActiveBundlesTask.java?rev=1374289&r1=1374288&r2=1374289&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/RestartActiveBundlesTask.java (original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/RestartActiveBundlesTask.java Fri Aug 17 14:34:43 2012
@@ -1,5 +1,5 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
+k * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
@@ -61,6 +61,7 @@ public class RestartActiveBundlesTask ex
public void execute(final InstallationContext ctx) {
@SuppressWarnings("unchecked")
final Set<Long> ids = (Set<Long>) this.getResource().getAttribute(ATTR);
+ int started = 0;
if ( ids != null ) {
final Set<Long> remove = new HashSet<Long>();
for(final Long id : ids) {
@@ -72,17 +73,20 @@ public class RestartActiveBundlesTask ex
&& bundle.getState() != Bundle.UNINSTALLED) {
try {
bundle.start();
+ started++;
ctx.log("Started bundle {}", bundle);
remove.add(id);
} catch (final BundleException e) {
getLogger().info("Unable to start bundle {} : {}", bundle, e.getMessage());
}
} else {
+ getLogger().debug("Bundle does not need restart: {} (state {})", bundle, bundle.getState());
remove.add(id);
}
}
ids.removeAll(remove);
}
+ getLogger().debug("{} bundles were started", started);
}
@Override