Search in sources :

Example 6 with JackrabbitRepository

use of org.apache.jackrabbit.api.JackrabbitRepository in project jackrabbit-oak by apache.

the class SimpleRepositoryFactoryTest method testRepositoryService.

@Test
public void testRepositoryService() throws Exception {
    Map<String, String> config = new HashMap<String, String>();
    config.put("org.apache.jackrabbit.repository.home", tmpFolder.getRoot().getAbsolutePath());
    config.put("org.apache.jackrabbit.oak.repository.configFile", path("oak-base-config.json") + "," + path("oak-tar-config.json"));
    Repository repository = JcrUtils.getRepository(config);
    assertNotNull(repository);
    ((JackrabbitRepository) repository).shutdown();
}
Also used : Repository(javax.jcr.Repository) JackrabbitRepository(org.apache.jackrabbit.api.JackrabbitRepository) HashMap(java.util.HashMap) JackrabbitRepository(org.apache.jackrabbit.api.JackrabbitRepository) Test(org.junit.Test)

Aggregations

JackrabbitRepository (org.apache.jackrabbit.api.JackrabbitRepository)6 Session (javax.jcr.Session)4 Test (org.junit.Test)4 HashMap (java.util.HashMap)2 Repository (javax.jcr.Repository)2 File (java.io.File)1 InputStream (java.io.InputStream)1 StringReader (java.io.StringReader)1 PrivilegedActionException (java.security.PrivilegedActionException)1 PrivilegedExceptionAction (java.security.PrivilegedExceptionAction)1 Properties (java.util.Properties)1 GuestCredentials (javax.jcr.GuestCredentials)1 Node (javax.jcr.Node)1 RepositoryException (javax.jcr.RepositoryException)1 SimpleCredentials (javax.jcr.SimpleCredentials)1 NodeType (javax.jcr.nodetype.NodeType)1 NodeTypeManager (javax.jcr.nodetype.NodeTypeManager)1 PropertyDefinition (javax.jcr.nodetype.PropertyDefinition)1 Subject (javax.security.auth.Subject)1 JackrabbitRepositoryFactory (org.apache.jackrabbit.api.JackrabbitRepositoryFactory)1