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 2008/11/14 14:10:30 UTC

svn commit: r713994 - /incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/BundleResourceProcessor.java

Author: bdelacretaz
Date: Fri Nov 14 05:10:30 2008
New Revision: 713994

URL: http://svn.apache.org/viewvc?rev=713994&view=rev
Log:
SLING-731 - more debug log messages

Modified:
    incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/BundleResourceProcessor.java

Modified: incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/BundleResourceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/BundleResourceProcessor.java?rev=713994&r1=713993&r2=713994&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/BundleResourceProcessor.java (original)
+++ incubator/sling/trunk/extensions/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/osgi/impl/BundleResourceProcessor.java Fri Nov 14 05:10:30 2008
@@ -115,6 +115,7 @@
      */
     public void frameworkEvent(FrameworkEvent event) {
         if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) {
+        	log.debug("FrameworkEvent.PACKAGES_REFRESHED");
             startBundles();
         }
     }
@@ -242,7 +243,7 @@
      */
     public void processResourceQueue() {
         if (needsRefresh) {
-            
+        	
             // reset the flag
             needsRefresh = false;
             
@@ -255,11 +256,14 @@
                 }
             }
 
+        	log.debug("Processing resource queue in REFRESH mode, {} active bundles found, refreshing packages", 
+        			activeBundles.size());
+        	
             // refresh now
             packageAdmin.refreshPackages(null);
             
         } else {
-            
+        	log.debug("Processing resource queue in START mode");
             startBundles();
         }
     }
@@ -353,8 +357,8 @@
      * all bundles, which have been freshly installed.
      */
     private void startBundles() {
-        startBundles(activeBundles);
-        startBundles(installedBundles);
+        startBundles(activeBundles, "active");
+        startBundles(installedBundles, "installed");
     }
     
     /**
@@ -366,7 +370,10 @@
      * 
      * @param bundleIdCollection The IDs of bundles to be started.
      */
-    private void startBundles(Collection<Long> bundleIdCollection) {
+    private void startBundles(Collection<Long> bundleIdCollection, String collectionName) {
+    	log.debug("startBundles({}): {} bundles to process", 
+    			collectionName, bundleIdCollection.size());
+    	
         // get the bundle ids and remove them from the collection
         Long[] bundleIds;
         synchronized (bundleIdCollection) {