jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1453199 - in /jackrabbit/oak/trunk/oak-run: pom.xml src/main/java/org/apache/jackrabbit/oak/run/Main.java
Date Wed, 06 Mar 2013 08:28:17 GMT
Author: jukka
Date: Wed Mar  6 08:28:17 2013
New Revision: 1453199

URL: http://svn.apache.org/r1453199
Log:
OAK-641: Improved benchmark tooling

Exclude oak-lucene for now from oak-run to avoid conflicts with Jackrabbit 2.x
Simplify repository setup using the .with() mechanism

Modified:
    jackrabbit/oak/trunk/oak-run/pom.xml
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java

Modified: jackrabbit/oak/trunk/oak-run/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/pom.xml?rev=1453199&r1=1453198&r2=1453199&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-run/pom.xml Wed Mar  6 08:28:17 2013
@@ -116,11 +116,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>oak-lucene</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
       <artifactId>oak-mongomk</artifactId>
       <version>${project.version}</version>
     </dependency>

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java?rev=1453199&r1=1453198&r2=1453199&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java Wed
Mar  6 08:28:17 2013
@@ -31,20 +31,12 @@ import org.apache.jackrabbit.oak.http.Oa
 import org.apache.jackrabbit.oak.jcr.RepositoryImpl;
 import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.commit.JcrConflictHandler;
-import org.apache.jackrabbit.oak.plugins.index.CompositeIndexHookProvider;
-import org.apache.jackrabbit.oak.plugins.index.IndexHookManager;
-import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.name.NameValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.name.NamespaceValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.DefaultTypeEditor;
 import org.apache.jackrabbit.oak.plugins.nodetype.RegistrationValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.TypeValidatorProvider;
-import org.apache.jackrabbit.oak.spi.commit.CommitHook;
-import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
-import org.apache.jackrabbit.oak.spi.commit.CompositeValidatorProvider;
-import org.apache.jackrabbit.oak.spi.commit.ValidatingHook;
-import org.apache.jackrabbit.oak.spi.commit.ValidatorProvider;
 import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
 import org.apache.jackrabbit.webdav.jcr.JCRWebdavServerServlet;
@@ -172,7 +164,13 @@ public class Main {
             SecurityProvider securityProvider = new OpenSecurityProvider();
             ContentRepository repository = new Oak(kernel)
                 .with(JcrConflictHandler.JCR_CONFLICT_HANDLER)
-                .with(buildDefaultCommitHook())
+                .with(new ConflictValidatorProvider())
+                .with(new NameValidatorProvider())
+                .with(new NamespaceValidatorProvider())
+                .with(new TypeValidatorProvider())
+                .with(new RegistrationValidatorProvider())
+                .with(new DefaultTypeEditor())
+                .with(new Property2IndexHookProvider())
                 .with(securityProvider)
                 .createContentRepository();
 
@@ -214,25 +212,6 @@ public class Main {
             context.addServlet(davex, path + "/davex/*");
         }
 
-        private static CommitHook buildDefaultCommitHook() {
-            return new CompositeHook(
-                    new DefaultTypeEditor(),
-                    new ValidatingHook(createDefaultValidatorProvider()),
-                    IndexHookManager.of(
-                            new CompositeIndexHookProvider(
-                            new Property2IndexHookProvider(), 
-                            new LuceneIndexHookProvider())));
-        }
-
-        private static ValidatorProvider createDefaultValidatorProvider() {
-            return new CompositeValidatorProvider(
-                    new ConflictValidatorProvider(),
-                    new NameValidatorProvider(),
-                    new NamespaceValidatorProvider(),
-                    new TypeValidatorProvider(),
-                    new RegistrationValidatorProvider());
-        }
-
     }
 
 }



Mime
View raw message