jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1399703 - in /jackrabbit/oak/trunk: oak-core/ oak-core/src/main/java/org/apache/jackrabbit/oak/core/ oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ oak-core/src/mai...
Date Thu, 18 Oct 2012 15:44:18 GMT
Author: jukka
Date: Thu Oct 18 15:44:17 2012
New Revision: 1399703

URL: http://svn.apache.org/viewvc?rev=1399703&view=rev
Log:
OAK-41: Initial repository setup

Make available() work on NodeStore instead of using MicroKernel directly.
TODO: Rename the interface from MicroKernelTracker.

Modified:
    jackrabbit/oak/trunk/oak-core/pom.xml
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/Activator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiMicroKernelTracker.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/CompositeMicroKernelTracker.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/DefaultMicroKernelTracker.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/MicroKernelTracker.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractOakTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/old/QueryTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java

Modified: jackrabbit/oak/trunk/oak-core/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/pom.xml?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-core/pom.xml Thu Oct 18 15:44:17 2012
@@ -42,6 +42,7 @@
                 org.apache.jackrabbit.oak,
                 org.apache.jackrabbit.oak.api,
                 org.apache.jackrabbit.oak.core,
+                org.apache.jackrabbit.oak.kernel,
                 org.apache.jackrabbit.oak.util,
                 org.apache.jackrabbit.oak.namepath,
                 org.apache.jackrabbit.oak.plugins.value,

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
Thu Oct 18 15:44:17 2012
@@ -34,9 +34,11 @@ import org.apache.jackrabbit.oak.api.Tre
 import org.apache.jackrabbit.oak.plugins.commit.DefaultConflictHandler;
 import org.apache.jackrabbit.oak.query.SessionQueryEngineImpl;
 import org.apache.jackrabbit.oak.spi.commit.ConflictHandler;
+import org.apache.jackrabbit.oak.spi.query.CompositeQueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.security.authorization.AccessControlProvider;
 import org.apache.jackrabbit.oak.spi.security.authorization.CompiledPermissions;
+import org.apache.jackrabbit.oak.spi.security.authorization.OpenAccessControlProvider;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 import org.apache.jackrabbit.oak.spi.state.NodeStateDiff;
@@ -126,6 +128,14 @@ public class RootImpl implements Root {
         refresh();
     }
 
+    public RootImpl(NodeStore store) {
+        this.store = checkNotNull(store);
+        this.subject = new Subject();
+        this.accProvider = new OpenAccessControlProvider();
+        this.indexProvider = new CompositeQueryIndexProvider();
+        refresh();
+    }
+
     public void setConflictHandler(ConflictHandler conflictHandler) {
         this.conflictHandler = conflictHandler;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/Activator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/Activator.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/Activator.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/Activator.java
Thu Oct 18 15:44:17 2012
@@ -23,6 +23,7 @@ import java.util.Properties;
 import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
+import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
 import org.apache.jackrabbit.oak.plugins.nodetype.DefaultTypeEditor;
 import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
 import org.apache.jackrabbit.oak.spi.commit.ValidatingHook;
@@ -79,7 +80,7 @@ public class Activator implements Bundle
         Object service = context.getService(reference);
         if (service instanceof MicroKernel) {
             MicroKernel kernel = (MicroKernel) service;
-            kernelTracker.available(kernel);
+            kernelTracker.available(new KernelNodeStore(kernel));
             Oak oak = new Oak(kernel)
                     .with(new CompositeHook(
                         // TODO: DefaultTypeEditor is JCR specific and does not belong here

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiMicroKernelTracker.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiMicroKernelTracker.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiMicroKernelTracker.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiMicroKernelTracker.java
Thu Oct 18 15:44:17 2012
@@ -18,8 +18,8 @@
  */
 package org.apache.jackrabbit.oak.osgi;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.oak.spi.lifecycle.MicroKernelTracker;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
 import org.osgi.framework.ServiceReference;
 
 /**
@@ -34,18 +34,18 @@ public class OsgiMicroKernelTracker
     /**
      * The reference to the micro kernel once available.
      */
-    private volatile MicroKernel mk;
+    private volatile NodeStore store;
 
     public OsgiMicroKernelTracker() {
         super(MicroKernelTracker.class);
     }
 
     @Override
-    public void available(MicroKernel mk) {
-        this.mk = mk;
-        if (mk != null) {
+    public void available(NodeStore store) {
+        this.store = store;
+        if (store != null) {
             for (MicroKernelTracker mki : getServices()) {
-                mki.available(mk);
+                mki.available(store);
             }
         }
     }
@@ -54,9 +54,9 @@ public class OsgiMicroKernelTracker
     public Object addingService(ServiceReference reference) {
         MicroKernelTracker mki =
                 (MicroKernelTracker) super.addingService(reference);
-        MicroKernel microKernel = mk;
-        if (microKernel != null) {
-            mki.available(mk);
+        NodeStore store = this.store;
+        if (store != null) {
+            mki.available(store);
         }
         return mki;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
Thu Oct 18 15:44:17 2012
@@ -18,14 +18,11 @@ package org.apache.jackrabbit.oak.plugin
 
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Service;
-import org.apache.jackrabbit.mk.api.MicroKernel;
-import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
-import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Type;
+import org.apache.jackrabbit.oak.core.RootImpl;
 import org.apache.jackrabbit.oak.spi.lifecycle.DefaultMicroKernelTracker;
 import org.apache.jackrabbit.oak.spi.lifecycle.MicroKernelTracker;
-import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeStore;
 import org.apache.jackrabbit.oak.spi.state.NodeStoreBranch;
@@ -39,8 +36,7 @@ import org.apache.jackrabbit.oak.spi.sta
 public class InitialContent extends DefaultMicroKernelTracker {
 
     @Override
-    public void available(MicroKernel mk) {
-        NodeStore store = new Oak(mk).createNodeStore();
+    public void available(NodeStore store) {
         NodeStoreBranch branch = store.branch();
 
         NodeBuilder root = branch.getRoot().builder();
@@ -113,16 +109,7 @@ public class InitialContent extends Defa
             throw new RuntimeException(e); // TODO: shouldn't need the wrapper
         }
 
-        BuiltInNodeTypes.register(createRoot(mk));
+        BuiltInNodeTypes.register(new RootImpl(store));
     }
 
-    private Root createRoot(MicroKernel mk) {
-        Oak oak = new Oak(mk);
-        oak.with(new OpenSecurityProvider()); // TODO: this shouldn't be needed
-        try {
-            return oak.createContentRepository().login(null, null).getLatestRoot();
-        } catch (Exception e) {
-            throw new IllegalStateException("Unable to create a Root", e);
-        }
-    }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/CompositeMicroKernelTracker.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/CompositeMicroKernelTracker.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/CompositeMicroKernelTracker.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/CompositeMicroKernelTracker.java
Thu Oct 18 15:44:17 2012
@@ -24,6 +24,7 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
 
 /**
  * <code>CompositeMicroKernelTracker</code> consists of multiple micro kernel
@@ -42,9 +43,9 @@ public class CompositeMicroKernelTracker
     }
 
     @Override
-    public void available(MicroKernel mk) {
+    public void available(NodeStore store) {
         for (MicroKernelTracker tracker : trackers) {
-            tracker.available(mk);
+            tracker.available(store);
         }
     }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/DefaultMicroKernelTracker.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/DefaultMicroKernelTracker.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/DefaultMicroKernelTracker.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/DefaultMicroKernelTracker.java
Thu Oct 18 15:44:17 2012
@@ -16,7 +16,7 @@
  */
 package org.apache.jackrabbit.oak.spi.lifecycle;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
 
 /**
  * {@code DefaultMicroKernelTracker} is a default implementation of all methods
@@ -31,6 +31,6 @@ import org.apache.jackrabbit.mk.api.Micr
 public class DefaultMicroKernelTracker implements MicroKernelTracker {
 
     @Override
-    public void available(MicroKernel mk) {
+    public void available(NodeStore store) {
     }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/MicroKernelTracker.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/MicroKernelTracker.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/MicroKernelTracker.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/MicroKernelTracker.java
Thu Oct 18 15:44:17 2012
@@ -19,6 +19,7 @@
 package org.apache.jackrabbit.oak.spi.lifecycle;
 
 import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
 
 /**
  * This interface is mainly used in an OSGi environment where various components
@@ -32,5 +33,6 @@ public interface MicroKernelTracker {
      * tracker become available in the system.
      * @param mk the {@link MicroKernel} instance.
      */
-    public void available(MicroKernel mk);
+    public void available(NodeStore store);
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractOakTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractOakTest.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractOakTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/AbstractOakTest.java
Thu Oct 18 15:44:17 2012
@@ -30,6 +30,7 @@ import org.apache.jackrabbit.mk.core.Mic
 import org.apache.jackrabbit.oak.api.ContentRepository;
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.Tree;
+import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
 import org.apache.jackrabbit.oak.plugins.nodetype.InitialContent;
 import org.apache.jackrabbit.oak.security.OakConfiguration;
 import org.apache.jackrabbit.oak.spi.lifecycle.CompositeMicroKernelTracker;
@@ -57,7 +58,7 @@ public abstract class AbstractOakTest {
 
     protected MicroKernel createMicroKernelWithInitialContent() {
         MicroKernel mk = new MicroKernelImpl();
-        new InitialContent().available(mk);
+        new InitialContent().available(new KernelNodeStore(mk));
         return mk;
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
Thu Oct 18 15:44:17 2012
@@ -21,6 +21,7 @@ import org.apache.jackrabbit.mk.core.Mic
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
 import org.apache.jackrabbit.oak.api.Tree;
+import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
 import org.apache.jackrabbit.oak.query.AbstractQueryTest;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
@@ -49,7 +50,7 @@ public class LuceneIndexQueryTest extend
                 new LuceneReindexHook(TEST_INDEX_HOME), new LuceneHook(
                         TEST_INDEX_HOME));
         MicroKernel mk = new MicroKernelImpl();
-        createDefaultKernelTracker().available(mk);
+        createDefaultKernelTracker().available(new KernelNodeStore(mk));
         return new Oak(mk).with(qip).with(ch).with(getSecurityProvider()).createContentRepository();
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/old/QueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/old/QueryTest.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/old/QueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/old/QueryTest.java
Thu Oct 18 15:44:17 2012
@@ -17,6 +17,7 @@ import org.apache.jackrabbit.mk.core.Mic
 import org.apache.jackrabbit.mk.index.IndexWrapper;
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
+import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
 import org.apache.jackrabbit.oak.query.AbstractQueryTest;
 import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
 import org.apache.jackrabbit.oak.spi.query.CompositeQueryIndexProvider;
@@ -43,7 +44,7 @@ public class QueryTest extends AbstractQ
         PropertyIndexer pi = new PropertyIndexer(indexer);
         QueryIndexProvider qip = new CompositeQueryIndexProvider(pi);
         CompositeHook hook = new CompositeHook(pi);
-        createDefaultKernelTracker().available(mk);
+        createDefaultKernelTracker().available(new KernelNodeStore(mk));
         return new Oak(mk).with(qip).with(hook).with(getSecurityProvider()).createContentRepository();
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
Thu Oct 18 15:44:17 2012
@@ -20,6 +20,7 @@ import org.apache.jackrabbit.mk.api.Micr
 import org.apache.jackrabbit.mk.core.MicroKernelImpl;
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
+import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
 import org.apache.jackrabbit.oak.query.AbstractQueryTest;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
@@ -38,7 +39,7 @@ public class PropertyIndexQueryTest exte
                 new PropertyIndexProvider());
         CommitHook ch = new CompositeHook(new PropertyIndexHook());
         MicroKernel mk = new MicroKernelImpl();
-        createDefaultKernelTracker().available(mk);
+        createDefaultKernelTracker().available(new KernelNodeStore(mk));
         return new Oak(mk).with(qip).with(ch).with(getSecurityProvider()).createContentRepository();
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
Thu Oct 18 15:44:17 2012
@@ -17,6 +17,7 @@ import org.apache.jackrabbit.mk.api.Micr
 import org.apache.jackrabbit.mk.core.MicroKernelImpl;
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
+import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
 import org.apache.jackrabbit.oak.query.AbstractQueryTest;
 
 /**
@@ -28,7 +29,7 @@ public class TraversingIndexQueryTest ex
     @Override
     protected ContentRepository createRepository() {
         MicroKernel mk = new MicroKernelImpl();
-        createDefaultKernelTracker().available(mk);
+        createDefaultKernelTracker().available(new KernelNodeStore(mk));
         return new Oak(mk).with(getSecurityProvider()).createContentRepository();
     }
 

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java?rev=1399703&r1=1399702&r2=1399703&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
Thu Oct 18 15:44:17 2012
@@ -30,6 +30,7 @@ import org.apache.jackrabbit.mk.api.Micr
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
 import org.apache.jackrabbit.oak.api.ContentSession;
+import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
 import org.apache.jackrabbit.oak.plugins.commit.AnnotatingConflictHandler;
 import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHook;
@@ -206,7 +207,7 @@ public class RepositoryImpl implements R
     }
 
     private static MicroKernel setupInitialContent(MicroKernel mk) {
-        new InitialContent().available(mk);
+        new InitialContent().available(new KernelNodeStore(mk));
         return mk;
     }
 }
\ No newline at end of file



Mime
View raw message