jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r998050 - /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java
Date Fri, 17 Sep 2010 10:16:07 GMT
Author: jukka
Date: Fri Sep 17 10:16:06 2010
New Revision: 998050

URL: http://svn.apache.org/viewvc?rev=998050&view=rev
Log:
JCR-2735: Make SessionProvider pluggable in JCRWebdavServerServlet

Patch by Justin Edelson

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java?rev=998050&r1=998049&r2=998050&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java
Fri Sep 17 10:16:06 2010
@@ -18,6 +18,7 @@ package org.apache.jackrabbit.webdav.jcr
 
 import org.apache.jackrabbit.server.BasicCredentialsProvider;
 import org.apache.jackrabbit.server.CredentialsProvider;
+import org.apache.jackrabbit.server.SessionProvider;
 import org.apache.jackrabbit.server.SessionProviderImpl;
 import org.apache.jackrabbit.server.jcr.JCRWebdavServer;
 import org.apache.jackrabbit.webdav.DavException;
@@ -169,7 +170,7 @@ public abstract class JCRWebdavServerSer
     public DavSessionProvider getDavSessionProvider() {
         if (server == null) {
             Repository repository = getRepository();
-            server = new JCRWebdavServer(repository, new SessionProviderImpl(getCredentialsProvider()));
+            server = new JCRWebdavServer(repository, getSessionProvider());
         }
         return server;
     }
@@ -318,4 +319,13 @@ public abstract class JCRWebdavServerSer
     protected CredentialsProvider getCredentialsProvider() {
         return new BasicCredentialsProvider(getInitParameter(INIT_PARAM_MISSING_AUTH_MAPPING));
     }
+
+    /**
+     * Returns a new instanceof <code>SessionProviderImpl</code>.
+     *
+     * @return a new session provider
+     */
+    protected SessionProvider getSessionProvider() {
+        return new SessionProviderImpl(getCredentialsProvider());
+    }
 }



Mime
View raw message