jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r657072 - /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
Date Fri, 16 May 2008 14:08:28 GMT
Author: jukka
Date: Fri May 16 07:08:27 2008
New Revision: 657072

URL: http://svn.apache.org/viewvc?rev=657072&view=rev
Log:
JCR-1564: JSR 283 namespace handling
    - AbstractSession should be usable in session pools, so there needs
      to be a way to clear the local namespace mappings

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java?rev=657072&r1=657071&r2=657072&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
Fri May 16 07:08:27 2008
@@ -60,6 +60,16 @@
      */
     private final Map namespaces = new HashMap();
 
+    /**
+     * Clears the local namespace mappings. Subclasses that for example
+     * want to participate in a session pools should remember to call
+     * <code>super.logout()</code> when overriding this method to avoid
+     * namespace mappings to be carried over to a new session.
+     */
+    public void logout() {
+        namespaces.clear();
+    }
+
     //------------------------------------------------< Namespace handling >--
 
     /**



Mime
View raw message