jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1133347 - in /jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel: RepositoryServiceFactoryImpl.java RepositoryServiceImpl.java
Date Wed, 08 Jun 2011 11:11:57 GMT
Author: mduerig
Date: Wed Jun  8 11:11:56 2011
New Revision: 1133347

URL: http://svn.apache.org/viewvc?rev=1133347&view=rev
Log:
spi2microkernel prototype (WIP)
use factory for creating micro kernel

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceFactoryImpl.java
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceFactoryImpl.java?rev=1133347&r1=1133346&r2=1133347&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceFactoryImpl.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceFactoryImpl.java
Wed Jun  8 11:11:56 2011
@@ -18,6 +18,8 @@
  */
 package org.apache.jackrabbit.spi2microkernel;
 
+import org.apache.jackrabbit.mk.MicroKernelImpl;
+import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.spi.RepositoryService;
 import org.apache.jackrabbit.spi.RepositoryServiceFactory;
 
@@ -31,7 +33,11 @@ public class RepositoryServiceFactoryImp
     
     public RepositoryService createRepositoryService(Map<?, ?> parameters) throws RepositoryException
{
         String homeDir = getHomeDir(parameters);
-        return new RepositoryServiceImpl(homeDir);
+
+        // todo use factory to create actual micro kernel instance
+        MicroKernel microKernel = new MicroKernelImpl(homeDir);
+
+        return new RepositoryServiceImpl(microKernel);
     }
 
     //------------------------------------------< private >---

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1133347&r1=1133346&r2=1133347&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Wed Jun  8 11:11:56 2011
@@ -18,7 +18,6 @@
  */
 package org.apache.jackrabbit.spi2microkernel;
 
-import org.apache.jackrabbit.mk.MicroKernelImpl;
 import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.mk.util.PathUtil;
@@ -76,11 +75,11 @@ public class RepositoryServiceImpl exten
     private final MicroKernel microKernel;
     private final Map<SessionInfo, String> sessions = new HashMap<SessionInfo, String>();
 
-    public RepositoryServiceImpl(String homeDir) throws RepositoryException {
+    public RepositoryServiceImpl(MicroKernel microKernel) throws RepositoryException {
         super(DESCRIPTORS, NAMESPACES, NodeTypes.getDefaultNodeTypes());
 
         try {
-            microKernel = new MicroKernelImpl(homeDir);  // xxx who disposes the micro kernel?
+            this.microKernel = microKernel;  // xxx who disposes the micro kernel?
 
             String head = microKernel.getHeadRevision();
             createWorkspace(head, Paths.DEFAULT_WORKSPACE, true);



Mime
View raw message