Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.RepositoryImpl$DescriptorValue


    private static final Logger LOG = LoggerFactory.getLogger(GarbageCollectorTest.class);

    public void testConcurrentGC() throws Exception {
        Node root = testRootNode;
        Session session = root.getSession();
        RepositoryImpl rep = (RepositoryImpl) session.getRepository();
        if (rep.getDataStore() == null) {
            LOG.info("testConcurrentGC skipped. Data store is not used.");
            return;
        }
        final SynchronousChannel sync = new SynchronousChannel();
        final Node node = root.addNode("slowBlob");
View Full Code Here


    public void testGC() throws Exception {
        Node root = testRootNode;
        Session session = root.getSession();

        RepositoryImpl rep = (RepositoryImpl) session.getRepository();
        if (rep.getDataStore() == null) {
            LOG.info("testGC skipped. Data store is not used.");
            return;
        }

        deleteMyNodes();
View Full Code Here

    public void testTransientObjects() throws Exception {

        Node root = testRootNode;
        Session session = root.getSession();

        RepositoryImpl rep = (RepositoryImpl) session.getRepository();
        if (rep.getDataStore() == null) {
            LOG.info("testTransientObjects skipped. Data store is not used.");
            return;
        }

        deleteMyNodes();
View Full Code Here

    public void repositoryStart() throws Exception {
        InputStream config =
            RepositoryImpl.class.getResourceAsStream("repository.xml");
        String home = new File("target/cltest").getAbsolutePath();
        RepositoryConfig rc = RepositoryConfig.create(config, home);
        RepositoryImpl repository = RepositoryImpl.create(rc);

        try {
            Context ctx = getInitialContext();
            ctx.bind(REPOSITORY_NAME, repository);
        } catch (NamingException ne) {
            repository.shutdown();
            throw ne;
        }
    }
View Full Code Here

     * by SessionImpl.createDataStoreGarbageCollector().
     *
     * @param list the persistence managers
     */
    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;
    }
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

            log("Test skipped. Required repository class: "
                    + RepositoryImpl.class + " got: " + rep.getClass());
            return;
        }

        RepositoryImpl r = (RepositoryImpl) rep;
        RepositoryConfig conf = r.getConfig();
        Collection coll = conf.getWorkspaceConfigs();
        String[] names = new String[coll.size()];
        Iterator wspIt = coll.iterator();
        for(int i = 0; wspIt.hasNext(); i++) {
            WorkspaceConfig wsc = (WorkspaceConfig) wspIt.next();
            names[i] = wsc.getName();
        }

        for (int i = 0; i < names.length; i++) {
            Session s = helper.getSuperuserSession(names[i]);
            try {
                Method m = r.getClass().getDeclaredMethod("getWorkspaceInfo", new Class[] { String.class });
                m.setAccessible(true);
                Object info = m.invoke(r, new String[] { names[i] });
                m = info.getClass().getDeclaredMethod("getPersistenceManager", new Class[0]);
                m.setAccessible(true);
                PersistenceManager pm = (PersistenceManager) m.invoke(info, new Object[0]);
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

    private static final Logger LOG = LoggerFactory.getLogger(GarbageCollectorTest.class);

    public void testConcurrentGC() throws Exception {
        Node root = testRootNode;
        Session session = root.getSession();
        RepositoryImpl rep = (RepositoryImpl) session.getRepository();
        if (rep.getDataStore() == null) {
            LOG.info("testConcurrentGC skipped. Data store is not used.");
            return;
        }
        final SynchronousChannel sync = new SynchronousChannel();
        final Node node = root.addNode("slowBlob");
View Full Code Here

    public void testGC() throws Exception {
        Node root = testRootNode;
        Session session = root.getSession();

        RepositoryImpl rep = (RepositoryImpl) session.getRepository();
        if (rep.getDataStore() == null) {
            LOG.info("testGC skipped. Data store is not used.");
            return;
        }

        deleteMyNodes();
View Full Code Here

TOP

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

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.