sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject svn commit: r1677768 - in /sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server: JcrRepositoryHacks.java OakSlingRepository.java OakSlingRepositoryManager.java
Date Tue, 05 May 2015 09:56:28 GMT
Author: rombert
Date: Tue May  5 09:56:27 2015
New Revision: 1677768

URL: http://svn.apache.org/r1677768
Log:
SLING-4690 - Use oak's OsgiRepository instead of JcrRepositoryHacks

Removed:
    sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/JcrRepositoryHacks.java
Modified:
    sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepository.java
    sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java

Modified: sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepository.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepository.java?rev=1677768&r1=1677767&r2=1677768&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepository.java
(original)
+++ sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepository.java
Tue May  5 09:56:27 2015
@@ -31,8 +31,8 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.security.auth.Subject;
 
+import org.apache.jackrabbit.api.JackrabbitRepository;
 import org.apache.jackrabbit.oak.api.AuthInfo;
-import org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl;
 import org.apache.jackrabbit.oak.spi.security.authentication.AuthInfoImpl;
 import org.apache.jackrabbit.oak.spi.security.principal.AdminPrincipal;
 import org.apache.sling.jcr.base.AbstractSlingRepository2;
@@ -71,11 +71,9 @@ public class OakSlingRepository extends
                 @Override
                 public Session run() throws Exception {
                     Map<String, Object> attrs = new HashMap<String, Object>();
-                    attrs.put(RepositoryImpl.REFRESH_INTERVAL, 0);
-                    // TODO OAK-803: Backwards compatibility of long-lived
-                    // sessions
-                    // Remove dependency on implementation specific API
-                    RepositoryImpl repo = (RepositoryImpl) OakSlingRepository.this.getRepository();
+                    attrs.put("oak.refresh-interval", 0);
+                    // TODO OAK-803: Backwards compatibility of long-lived sessions
+                	JackrabbitRepository repo = (JackrabbitRepository) getRepository();
                     return repo.login(null, null, attrs);
                 }
             }, null);

Modified: sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java?rev=1677768&r1=1677767&r2=1677768&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java
(original)
+++ sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java
Tue May  5 09:56:27 2015
@@ -43,9 +43,11 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.ReferencePolicy;
+import org.apache.jackrabbit.api.JackrabbitRepository;
 import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils;
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
+import org.apache.jackrabbit.oak.jcr.osgi.OsgiRepository;
 import org.apache.jackrabbit.oak.osgi.OsgiWhiteboard;
 import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.commit.JcrConflictHandler;
@@ -248,7 +250,7 @@ public class OakSlingRepositoryManager e
         }
 
         final ContentRepository contentRepository = oak.createContentRepository();
-        return new JcrRepositoryHacks(contentRepository, whiteboard, securityProvider, observationQueueLength,
commitRateLimiter);
+        return new OsgiRepository(contentRepository, whiteboard, securityProvider, observationQueueLength,
commitRateLimiter);
     }
 
     @Override
@@ -306,7 +308,7 @@ public class OakSlingRepositoryManager e
         this.indexEditorProvider.stop();
         this.oakExecutorServiceReference.unregister();
         this.oakExecutorServiceReference = null;
-        ((JcrRepositoryHacks) repository).shutdown();
+        ((JackrabbitRepository) repository).shutdown();
         this.adminUserName = null;
     }
 



Mime
View raw message