Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.RepositoryImpl


            // Prevent Derby from polluting the current directory
            System.setProperty(
                    "derby.stream.error.file",
                    new File(directory, "derby.log").getPath());

            RepositoryImpl repository = RepositoryImpl.create(config);
            this.cluster = new RepositoryImpl[] { repository };
            return new Repository[] { repository };
        } else {
            throw new UnsupportedOperationException("TODO");
        }
View Full Code Here


    private void deleteAll() throws IOException {
        FileUtils.deleteDirectory(new File("./target/dbClusterTest"));
    }

    public void test() throws RepositoryException {
        RepositoryImpl rep1 = RepositoryImpl.create(RepositoryConfig.create(
                new File("./target/dbClusterTest/node1")));
        RepositoryImpl rep2 = RepositoryImpl.create(RepositoryConfig.create(
                new File("./target/dbClusterTest/node2")));
        Session s1 = rep1.login(new SimpleCredentials("admin", "admin".toCharArray()));
        Session s2 = rep2.login(new SimpleCredentials("admin", "admin".toCharArray()));
        s1.getRootNode().addNode("test1");
        s2.getRootNode().addNode("test2");
        s1.save();
        s2.save();
        s1.refresh(true);
        s2.refresh(true);
        s1.getRootNode().getNode("test2");
        s2.getRootNode().getNode("test1");
        rep1.shutdown();
        rep2.shutdown();
    }
View Full Code Here

        String text = "the quick brown fox jumps over the lazy dog.";
        int num = createFiles(testFolder, text.getBytes(ENCODING), 10, 2, 0);
        session.save();

        // shutdown workspace
        RepositoryImpl repo = (RepositoryImpl) session.getRepository();
        session.logout();
        session = null;
        superuser.logout();
        superuser = null;
        TestHelper.shutdownWorkspace(WORKSPACE_NAME, repo);
View Full Code Here

        JackrabbitParser.block();
        SearchIndex index = getSearchIndex();
        File indexDir = new File(index.getPath());

        // shutdown workspace
        RepositoryImpl repo = (RepositoryImpl) session.getRepository();
        session.logout();
        session = null;
        superuser.logout();
        superuser = null;
        TestHelper.shutdownWorkspace(WORKSPACE_NAME, repo);
View Full Code Here

        }
    }
   
    public void dispose() {
        // Shutdown the repository to release the concurrent access lock
        RepositoryImpl repo = (RepositoryImpl)delegate;
        super.dispose();
        repo.shutdown();
    }
View Full Code Here

        }
    }
   
    public void dispose() {
        // Shutdown the repository to release the concurrent access lock
        RepositoryImpl repo = (RepositoryImpl)delegate;
        super.dispose();
        repo.shutdown();
    }
View Full Code Here

     * @param session the session that created this object
     * @param list the persistence managers
     * @param sessionList the sessions to access the workspaces
     */
    public GarbageCollector(SessionImpl session, IterablePersistenceManager[] list, Session[] sessionList) {
        RepositoryImpl rep = (RepositoryImpl) session.getRepository();
        store = rep.getDataStore();
        this.pmList = list;
        this.persistenceManagerScan = list != null;
        this.sessionList = sessionList;

        // Auto-close if the main session logs out
View Full Code Here

                IOUtils.copy(repoConfig, out);
                out.close();
                repoConfig.close();
                config = RepositoryConfig.create(source);
            }
            RepositoryImpl repository = RepositoryImpl.create(config);
            try {
                createSourceContent(repository);
            } finally {
                repository.shutdown();
            }
            NodeStore target = new SegmentNodeStore();
            RepositoryUpgrade.copy(source, target);
            targetRepository = new Jcr(new Oak(target)).createRepository();
        }
View Full Code Here

                    "bundleCacheSize", Integer.toString(bundleCacheSize));
            InputStream xml = getClass().getResourceAsStream("repository.xml");
            RepositoryConfig config = RepositoryConfig.create(
                    new InputSource(xml), variables);

            RepositoryImpl repository = RepositoryImpl.create(config);
            this.cluster = new RepositoryImpl[] { repository };
            return new Repository[] { repository };
        } else {
            throw new UnsupportedOperationException("TODO");
        }
View Full Code Here

        File directory = new File("target", "upgrade");
        FileUtils.deleteQuietly(directory);

        File source = new File(directory, "source");
        RepositoryConfig config = RepositoryConfig.install(source);
        RepositoryImpl repository = RepositoryImpl.create(config);
        try {
            createSourceContent(repository);
        } finally {
            repository.shutdown();
        }

        NodeStore target = new KernelNodeStore(new MicroKernelImpl());
        RepositoryUpgrade.copy(source, target);
        Jcr jcr = new Jcr(new Oak(target));
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.RepositoryImpl

Copyright © 2018 www.massapicom. 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.