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/01/30 09:47:19 UTC
svn commit: r616687 - in
/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal:
ContentLoaderService.java loader/Loader.java
Author: bdelacretaz
Date: Wed Jan 30 00:47:18 2008
New Revision: 616687
URL: http://svn.apache.org/viewvc?rev=616687&view=rev
Log:
Improved logging of the initial content loading process
Modified:
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/ContentLoaderService.java
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/ContentLoaderService.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/ContentLoaderService.java?rev=616687&r1=616686&r2=616687&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/ContentLoaderService.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/ContentLoaderService.java Wed Jan 30 00:47:18 2008
@@ -136,15 +136,28 @@
try {
final Session session = getAdminSession();
+ log.debug(
+ "Activated - attempting to load content from all "
+ + "bundles which are neither INSTALLED nor UNINSTALLED");
+
+ int ignored = 0;
Bundle[] bundles = componentContext.getBundleContext().getBundles();
for (Bundle bundle : bundles) {
if ((bundle.getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
// load content for bundles which are neither INSTALLED nor
// UNINSTALLED
initialContentLoader.registerBundle(session, bundle);
+ } else {
+ ignored++;
}
}
+
+ log.debug(
+ "Out of {} bundles, {} were not in a suitable state for initial content loading",
+ bundles.length, ignored
+ );
+
} catch (Throwable t) {
log.error("activate: Problem while loading initial content and"
+ " registering mappings for existing bundles", t);
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java?rev=616687&r1=616686&r2=616687&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java Wed Jan 30 00:47:18 2008
@@ -155,6 +155,7 @@
// persist modifications now
session.save();
+ log.debug("Done installing initial content from bundle {}", bundle.getSymbolicName());
} finally {
try {
if (session.hasPendingChanges()) {
@@ -173,13 +174,14 @@
@SuppressWarnings("unchecked")
Enumeration<String> entries = bundle.getEntryPaths(path);
if (entries == null) {
- log.info("install: No entries at {}", path);
+ log.info("install: No initial content entries at {}", path);
return;
}
Set<URL> ignoreEntry = new HashSet<URL>();
while (entries.hasMoreElements()) {
final String entry = entries.nextElement();
+ log.debug("Processing initial content entry {}", entry);
if (entry.endsWith("/")) {
// dir, check for node descriptor , else create dir
String base = entry.substring(0, entry.length()-1);