Examples of JackrabbitRepository


Examples of org.apache.jackrabbit.api.JackrabbitRepository

                keepAliveSession.logout();
            } finally {
                keepAliveSession = null;
                if (repository != null) {
                    try {
                        JackrabbitRepository jackrabbit = (JackrabbitRepository)repository;
                        jackrabbit.shutdown();
                    } finally {
                        repository = null;
                        // Clean up the test data ...
                        FileUtil.delete(JACKRABBIT_DATA_PATH);
                    }
View Full Code Here

Examples of org.apache.jackrabbit.api.JackrabbitRepository

     * instance.
     */
    private static final Map REPOSITORY_INSTANCES = new HashMap();

    public Repository getRepository(Map parameters) throws RepositoryException {
        JackrabbitRepository repo;
        synchronized (REPOSITORY_INSTANCES) {
            if (parameters == null) {
                repo = getOrCreateRepository(null, null);
            } else if (parameters.containsKey(REPOSITORY_CONF)
                    && parameters.containsKey(REPOSITORY_HOME)) {
View Full Code Here

Examples of org.apache.jackrabbit.api.JackrabbitRepository

     *          repository instance.
     */
    private JackrabbitRepository getOrCreateRepository(String conf,
                                                       String home)
            throws RepositoryException {
        JackrabbitRepository repo = (JackrabbitRepository) REPOSITORY_INSTANCES.get(home);
        try {
            if (repo == null) {
                if (home == null) {
                    repo = new TransientRepository();
                } else {
View Full Code Here

Examples of org.apache.jackrabbit.api.JackrabbitRepository

            try {
                if (session != null) session.logout();
            } finally {
                try {
                    if (repository instanceof JackrabbitRepository) {
                        JackrabbitRepository jr = (JackrabbitRepository)repository;
                        jr.shutdown();
                    }
                    if (repository instanceof TransientRepository) {
                        TransientRepository trans = (TransientRepository)repository;
                        deleteDirectory(trans.getHomeDir());
                    }
View Full Code Here

Examples of org.apache.jackrabbit.api.JackrabbitRepository

  }

  @AfterClass
  public static void afterAll() throws Exception {
    try {
      JackrabbitRepository jackrabbit = (JackrabbitRepository) repository;
      jackrabbit.shutdown();
    } finally {
      FileUtil.delete(new File(JCR_DATA_PATH));
    }
  }
View Full Code Here

Examples of org.apache.jackrabbit.api.JackrabbitRepository

     * Tests if a microkernel fixture sets the SNNP repository descriptor to false.
     */
    @Test
    public void testMicroKernelSupport() throws Exception {
        NodeStore nodeStore = NodeStoreFixture.DOCUMENT_MK.createNodeStore();
        JackrabbitRepository repository  = (JackrabbitRepository) new Jcr(nodeStore).createRepository();
        try {
            assertFalse(repository.getDescriptorValue(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED).getBoolean());
        } finally {
            repository.shutdown();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.JackrabbitRepository

     * Tests if a nodestore fixture sets the SNNP repository descriptor to true.
     */
    @Test
    public void testNodeStoreSupport() throws Exception {
        NodeStore nodeStore = NodeStoreFixture.SEGMENT_MK.createNodeStore();
        JackrabbitRepository repository  = (JackrabbitRepository) new Jcr(nodeStore).createRepository();
        try {
            assertTrue(repository.getDescriptorValue(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED).getBoolean());
        } finally {
            repository.shutdown();
        }

    }
View Full Code Here

Examples of org.apache.jackrabbit.api.JackrabbitRepository

     * Tests if a microkernel fixture sets the SNNP repository descriptor to false.
     */
    @Test
    public void testMicroKernelSupport() throws Exception {
        NodeStore nodeStore = NodeStoreFixture.MK_IMPL.createNodeStore();
        JackrabbitRepository repository  = (JackrabbitRepository) new Jcr(nodeStore).createRepository();
        try {
            assertFalse(repository.getDescriptorValue(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED).getBoolean());
        } finally {
            repository.shutdown();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.JackrabbitRepository

     * Tests if a nodestore fixture sets the SNNP repository descriptor to true.
     */
    @Test
    public void testNodeStoreSupport() throws Exception {
        NodeStore nodeStore = NodeStoreFixture.SEGMENT_MK.createNodeStore();
        JackrabbitRepository repository  = (JackrabbitRepository) new Jcr(nodeStore).createRepository();
        try {
            assertTrue(repository.getDescriptorValue(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED).getBoolean());
        } finally {
            repository.shutdown();
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.