incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject svn commit: r832911 - in /sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl: AccessManagerFactoryTracker.java security/PluggableDefaultAccessManager.java
Date Wed, 04 Nov 2009 23:41:04 GMT
Author: ieb
Date: Wed Nov  4 23:41:04 2009
New Revision: 832911

URL: http://svn.apache.org/viewvc?rev=832911&view=rev
Log:
SLING-1170
Fixed, the message wil come out once per bundle install, and I have downgraded some other
related messages that were spamming to debug.

Modified:
    sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/AccessManagerFactoryTracker.java
    sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java

Modified: sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/AccessManagerFactoryTracker.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/AccessManagerFactoryTracker.java?rev=832911&r1=832910&r2=832911&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/AccessManagerFactoryTracker.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/AccessManagerFactoryTracker.java
Wed Nov  4 23:41:04 2009
@@ -76,19 +76,19 @@
 
     @Override
     public void modifiedService(ServiceReference serviceReference, Object o) {
-        log.info("AccessManager service modified.");
+        log.debug("AccessManager service modified.");
         super.modifiedService(serviceReference, o);
         this.factory = (AccessManagerPluginFactory) o;
     }
 
     public AccessManagerPluginFactory getFactory(PluggableDefaultAccessManager consumer)
{
-        log.info("Registering PluggableDefaultAccessManager instance");
+        log.debug("Registering PluggableDefaultAccessManager instance");
         this.consumers.add(consumer);
         return factory;
     }
 
     public void unregister(PluggableDefaultAccessManager consumer) {
-        log.info("Unregistering PluggableDefaultAccessManager instance");
+        log.debug("Unregistering PluggableDefaultAccessManager instance");
         this.consumers.remove(consumer);
     }
 }

Modified: sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java?rev=832911&r1=832910&r2=832911&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java
Wed Nov  4 23:41:04 2009
@@ -65,6 +65,8 @@
     protected AccessManagerFactoryTracker accessManagerFactoryTracker;
     private Session session;
     private Subject subject;
+    // only warn once, then only warn on debug level.
+    private static int pluginWarning = 0;
 
     public PluggableDefaultAccessManager() {
     }
@@ -154,7 +156,12 @@
         if (this.accessManagerPlugin == null) {
             AccessManagerPluginFactory factory = this.accessManagerFactoryTracker.getFactory(this);
             if (factory == null) {
-                log.warn("No pluggable AccessManager available, falling back to DefaultAccessManager");
+                if ( pluginWarning  == 0 ) {
+                    pluginWarning++;
+                    log.warn("No pluggable AccessManager available, falling back to DefaultAccessManager");
+                } else {
+                    log.debug("No pluggable AccessManager available, falling back to DefaultAccessManager");
                   
+                }
                 return false;
 
             } else {



Mime
View raw message