jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r556036 - /jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SPIServer.java
Date Fri, 13 Jul 2007 15:30:43 GMT
Author: mreutegg
Date: Fri Jul 13 08:30:42 2007
New Revision: 556036

URL: http://svn.apache.org/viewvc?view=rev&rev=556036
Log:
- try to setup repository with test data when using SPIServer

Modified:
    jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SPIServer.java

Modified: jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SPIServer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SPIServer.java?view=diff&rev=556036&r1=556035&r2=556036
==============================================================================
--- jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SPIServer.java
(original)
+++ jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SPIServer.java
Fri Jul 13 08:30:42 2007
@@ -23,6 +23,8 @@
 import org.apache.jackrabbit.spi2jcr.BatchReadConfig;
 import org.apache.log4j.PropertyConfigurator;
 
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
 import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
 import java.rmi.RemoteException;
@@ -54,6 +56,13 @@
         RepositoryConfig config = RepositoryConfig.create(REPO_CONFIG, REPO_HOME);
         repo = org.apache.jackrabbit.core.RepositoryImpl.create(config);
         System.out.println("Jackrabbit started");
+        // try to setup test data
+        Session s = repo.login(new SimpleCredentials("user", "pass".toCharArray()));
+        try {
+            RepositorySetup.run(s);
+        } finally {
+            s.logout();
+        }
         // wrap with spi2jcr
         // TODO: make BatchReadConfig configurable
         RepositoryService repoService = new RepositoryServiceImpl(repo, new BatchReadConfig());



Mime
View raw message