jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1524732 - in /jackrabbit/branches/2.4: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/author...
Date Thu, 19 Sep 2013 13:22:15 GMT
Author: alexparvulescu
Date: Thu Sep 19 13:22:15 2013
New Revision: 1524732

URL: http://svn.apache.org/r1524732
Log:
JCR-3495 Unregister from PrivilegeRegistry and NodeTypeRegistry on Session.logout() (backport
to 2.4)


Modified:
    jackrabbit/branches/2.4/   (props changed)
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionContext.java

Propchange: jackrabbit/branches/2.4/
------------------------------------------------------------------------------
  Merged /jackrabbit/trunk:r1445122

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java?rev=1524732&r1=1524731&r2=1524732&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
Thu Sep 19 13:22:15 2013
@@ -952,6 +952,8 @@ public class SessionImpl extends Abstrac
             // notify listeners that session is about to be closed
             notifyLoggingOut();
 
+            context.getPrivilegeManager().dispose();
+            context.getNodeTypeManager().dispose();
             // dispose session item state manager
             context.getItemStateManager().dispose();
             // dispose item manager

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java?rev=1524732&r1=1524731&r2=1524732&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
Thu Sep 19 13:22:15 2013
@@ -126,6 +126,13 @@ public class NodeTypeManagerImpl extends
     }
 
     /**
+     * Disposes this node type manager.
+     */
+    public void dispose() {
+        context.getNodeTypeRegistry().removeListener(this);
+    }
+
+    /**
      * @return the root node definition
      */
     public NodeDefinitionImpl getRootNodeDefinition() {

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java?rev=1524732&r1=1524731&r2=1524732&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java
Thu Sep 19 13:22:15 2013
@@ -77,6 +77,13 @@ public final class PrivilegeManagerImpl 
         registry.addListener(this);
     }
 
+    /**
+     * Disposes this privilege manager
+     */
+    public void dispose() {
+        registry.removeListener(this);
+    }
+
     //---------------------------------------------------< PrivilegeManager >---
     /**
      * @see PrivilegeManager#getRegisteredPrivileges()

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java?rev=1524732&r1=1524731&r2=1524732&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java
Thu Sep 19 13:22:15 2013
@@ -665,6 +665,15 @@ public final class PrivilegeRegistry imp
         listeners.put(listener,listener);
     }
 
+    /**
+     * Removes a privilege registration listener.
+     *
+     * @param listener
+     */
+    public void removeListener(Listener listener) {
+        listeners.remove(listener);
+    }
+
     //---------------------------------------------< privilege registration >---
     /**
      * Register the specified custom privilege definitions.

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionContext.java?rev=1524732&r1=1524731&r2=1524732&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionContext.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionContext.java
Thu Sep 19 13:22:15 2013
@@ -88,7 +88,7 @@ public class SessionContext implements N
     /**
      * Privilege manager of this session.
      */
-    private final PrivilegeManager privilegeManager;
+    private final PrivilegeManagerImpl privilegeManager;
 
     /**
      * The namespace registry exposed for this session context that includes
@@ -246,7 +246,7 @@ public class SessionContext implements N
      *
      * @return the privilege manager.
      */
-    public PrivilegeManager getPrivilegeManager() {
+    public PrivilegeManagerImpl getPrivilegeManager() {
         return privilegeManager;
     }
 



Mime
View raw message