Index: frontend/engine/pom.xml
===================================================================
--- frontend/engine/pom.xml	(revision 21412)
+++ frontend/engine/pom.xml	(working copy)
@@ -63,6 +63,11 @@
     </dependency>
     <dependency>
       <groupId>org.hippoecm</groupId>
+      <artifactId>hippo-ecm-repository-connector</artifactId>
+      <version>2.12.00-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.hippoecm</groupId>
       <artifactId>hippo-ecm-addon-builtin-common</artifactId>
       <version>2.12.00-SNAPSHOT</version>
     </dependency>
Index: repository/engine/src/main/java/org/hippoecm/repository/BootstrapHippoRepository.java
===================================================================
--- repository/engine/src/main/java/org/hippoecm/repository/BootstrapHippoRepository.java	(revision 21412)
+++ repository/engine/src/main/java/org/hippoecm/repository/BootstrapHippoRepository.java	(working copy)
@@ -36,18 +36,18 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-class BootstrapRepository extends HippoRepositoryImpl {
+class BootstrapHippoRepository extends HippoRepositoryImpl {
     /** SVN id placeholder */
     @SuppressWarnings("unused")
     private final static String SVN_ID = "$Id: BootstrapHippoRepository.java 12039 2008-06-13 09:27:05Z bvanhalderen $";
 
-    protected final Logger log = LoggerFactory.getLogger(BootstrapRepository.class);
+    protected final Logger log = LoggerFactory.getLogger(BootstrapHippoRepository.class);
 
     private JackrabbitRepository backingRepository = null;
 
     private String location;
 
-    public BootstrapRepository(String location) throws RepositoryException {
+    public BootstrapHippoRepository(String location) throws RepositoryException {
         super();
         this.location = location;
 
@@ -91,7 +91,7 @@
     public static HippoRepository create(String location) throws RepositoryException {
         if(location.startsWith("bootstrap:"))
             location = location.substring("bootstrap:".length());
-        BootstrapRepository repository = new BootstrapRepository(location);
+        BootstrapHippoRepository repository = new BootstrapHippoRepository(location);
         Session session = repository.login();
         HippoRepository pivotRepository = LocalHippoRepository.create(session.getRootNode().getProperty("repository").getString());
         session.logout();
Index: repository/connector/src/main/java/org/hippoecm/repository/HippoRepositoryFactory.java
===================================================================
--- repository/connector/src/main/java/org/hippoecm/repository/HippoRepositoryFactory.java	(revision 21412)
+++ repository/connector/src/main/java/org/hippoecm/repository/HippoRepositoryFactory.java	(working copy)
@@ -125,30 +125,10 @@
         if (location.startsWith("rmi://")) {
             try {
                 defaultLocation = location;
-                try {
-                    if(!location.endsWith("/spi")) {
-                        return (HippoRepository) Class.forName("org.hippoecm.repository.RemoteHippoRepository").getMethod("create", new Class[] { String.class }).invoke(null, new Object[] { location });
-                    } else {
-                        return (HippoRepository) Class.forName("org.hippoecm.repository.SPIHippoRepository").getMethod("create", new Class[] { String.class }).invoke(null, new Object[] { location });
-                    }
-                } catch(ClassNotFoundException ex) {
-                    throw new RepositoryException(ex);
-                } catch(NoSuchMethodException ex) {
-                    throw new RepositoryException(ex);
-                } catch(IllegalAccessException ex) {
-                    throw new RepositoryException(ex);
-                } catch(InvocationTargetException ex) {
-                    if(ex.getCause() instanceof RemoteException) {
-                        throw (RemoteException) ex.getCause();
-                    } else if(ex.getCause() instanceof NotBoundException) {
-                        throw (NotBoundException) ex.getCause();
-                    } else if(ex.getCause() instanceof MalformedURLException) {
-                        throw (MalformedURLException) ex.getCause();
-                    } else if(ex.getCause() instanceof RepositoryException) {
-                        throw (RepositoryException) ex.getCause();
-                    } else {
-                        throw new RepositoryException("unchecked exception: "+ex.getCause().getMessage(), ex);
-                    }
+                if(!location.endsWith("/spi")) {
+                    return RemoteHippoRepository.create(location);
+                } else {
+                    return SPIHippoRepository.create(location);
                 }
             } catch (RemoteException ex) {
                 throw new RepositoryException("Unable to connect to repository", ex);
@@ -193,24 +173,8 @@
         }
 
         if(location.startsWith("vm:")) {
-            try {
-                defaultLocation = location;
-                return (HippoRepository) Class.forName("org.hippoecm.repository.VMHippoRepository").getMethod("create", new Class[] { String.class }).invoke(null, new Object[] { location });
-            } catch(ClassNotFoundException ex) {
-                throw new RepositoryException(ex);
-            } catch(NoSuchMethodException ex) {
-                throw new RepositoryException(ex);
-            } catch(IllegalAccessException ex) {
-                throw new RepositoryException(ex);
-            } catch(InvocationTargetException ex) {
-                if (ex.getCause() instanceof RepositoryException) {
-                    throw (RepositoryException) ex.getCause();
-                } else if (ex.getCause() instanceof IllegalArgumentException) {
-                    throw new RepositoryException("Invalid data: " + ex.getCause());
-                } else {
-                    throw new RepositoryException("unchecked exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
-                }
-            }
+            defaultLocation = location;
+            return VMHippoRepository.create(location);
         }
 
          if(location.startsWith("proxy:")) {

Property changes on: repository/connector/src/main/java/org/hippoecm/repository/HippoRepositoryFactory.java
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Index: addon/sample/repository/pom.xml
===================================================================
--- addon/sample/repository/pom.xml	(revision 21412)
+++ addon/sample/repository/pom.xml	(working copy)
@@ -47,6 +47,11 @@
     </dependency>
     <dependency>
       <groupId>org.hippoecm</groupId>
+      <artifactId>hippo-ecm-repository-connector</artifactId>
+      <version>2.12.00-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.hippoecm</groupId>
       <artifactId>hippo-ecm-addon-sample-common</artifactId>
       <version>2.12.00-SNAPSHOT</version>
     </dependency>
Index: api/src/main/java/org/hippoecm/repository/VMHippoRepository.java
===================================================================
--- api/src/main/java/org/hippoecm/repository/VMHippoRepository.java	(revision 21412)
+++ api/src/main/java/org/hippoecm/repository/VMHippoRepository.java	(working copy)
@@ -15,7 +15,6 @@
  */
 package org.hippoecm.repository;
 
-import java.rmi.NotBoundException;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -23,7 +22,7 @@
 
 import javax.jcr.RepositoryException;
 
-class VMHippoRepository {
+public class VMHippoRepository {
     @SuppressWarnings("unused")
     private final static String SVN_ID = "$Id: VMHippoRepository.java -1   $";
 
@@ -37,7 +36,7 @@
         repositories = Collections.synchronizedMap(map);
     }
 
-    public static HippoRepository create(String location) throws NotBoundException, RepositoryException {
+    public static HippoRepository create(String location) throws RepositoryException {
         HippoRepository hippoRepository = null;
         if (location != null && location.startsWith("vm://")) {
             location = location.substring("vm://".length());

Property changes on: api/src/main/java/org/hippoecm/repository/VMHippoRepository.java
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

