incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1410398 - /sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/BundleUpdateTask.java
Date Fri, 16 Nov 2012 15:34:40 GMT
Author: bdelacretaz
Date: Fri Nov 16 15:34:39 2012
New Revision: 1410398

URL: http://svn.apache.org/viewvc?rev=1410398&view=rev
Log:
SLING-2669 - set start level *after* updating bundle

Modified:
    sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/BundleUpdateTask.java

Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/BundleUpdateTask.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/BundleUpdateTask.java?rev=1410398&r1=1410397&r2=1410398&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/BundleUpdateTask.java
(original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/BundleUpdateTask.java
Fri Nov 16 15:34:39 2012
@@ -88,7 +88,12 @@ public class BundleUpdateTask extends Ab
                 b.stop();
             }
 
-            // start level handling
+            // update bundle
+            b.update(getResource().getInputStream());
+            ctx.log("Updated bundle {} from resource {}", b, getResource());
+
+            // start level handling - after update to avoid starting the bundle
+            // just before the update
             final StartLevel startLevelService = this.getStartLevel();
             if ( startLevelService != null ) {
                 final int newStartLevel = this.getBundleStartLevel();
@@ -98,8 +103,6 @@ public class BundleUpdateTask extends Ab
                     ctx.log("Set start level for bundle {} to {}", b, newStartLevel);
                 }
             }
-            b.update(getResource().getInputStream());
-            ctx.log("Updated bundle {} from resource {}", b, getResource());
 
             if (reactivate) {
                 if ( BundleUtil.isSystemBundleFragment(b) ) {
@@ -136,4 +139,4 @@ public class BundleUpdateTask extends Ab
         return BUNDLE_UPDATE_ORDER + getSortableStartLevel() + "-" + getResource().getEntityId();
     }
 
-}
\ No newline at end of file
+}



Mime
View raw message