Package org.apache.jackrabbit.api.management

Examples of org.apache.jackrabbit.api.management.RepositoryManager


        JackrabbitRepositoryFactory rf = new RepositoryFactoryImpl();
        Properties prop = new Properties();
        prop.setProperty("org.apache.jackrabbit.repository.home", TEST_DIR);
        prop.setProperty("org.apache.jackrabbit.repository.conf", TEST_DIR + "/repository.xml");
        JackrabbitRepository rep = (JackrabbitRepository) rf.getRepository(prop);
        RepositoryManager rm = rf.getRepositoryManager(rep);

        // need to login to start the repository
        Session session = rep.login(new SimpleCredentials("", "".toCharArray()));

        DataStoreGarbageCollector gc = rm.createDataStoreGarbageCollector();
        try {
            gc.mark();
            gc.sweep();
        } finally {
            gc.close();
        }

        session.logout();
        rm.stop();
    }
View Full Code Here


        JackrabbitRepositoryFactory rf = new RepositoryFactoryImpl();
        Properties prop = new Properties();
        prop.setProperty("org.apache.jackrabbit.repository.home", TEST_DIR);
        prop.setProperty("org.apache.jackrabbit.repository.conf", TEST_DIR + "/repository.xml");
        JackrabbitRepository rep = (JackrabbitRepository) rf.getRepository(prop);
        RepositoryManager rm = rf.getRepositoryManager(rep);

        // need to login to start the repository
        Session session = rep.login();

        DataStoreGarbageCollector gc = rm.createDataStoreGarbageCollector();
        try {
            gc.mark();
            gc.sweep();
        } finally {
            gc.close();
        }

        session.logout();
        rm.stop();
    }
View Full Code Here

        JackrabbitRepositoryFactory rf = new RepositoryFactoryImpl();
        Properties prop = new Properties();
        prop.setProperty("org.apache.jackrabbit.repository.home", TEST_DIR);
        prop.setProperty("org.apache.jackrabbit.repository.conf", TEST_DIR + "/repository.xml");
        JackrabbitRepository rep = (JackrabbitRepository) rf.getRepository(prop);
        RepositoryManager rm = rf.getRepositoryManager(rep);

        // need to login to start the repository
        Session session = rep.login(new SimpleCredentials("", "".toCharArray()));

        DataStoreGarbageCollector gc = rm.createDataStoreGarbageCollector();
        try {
            gc.mark();
            gc.sweep();
        } finally {
            gc.close();
        }

        session.logout();
        rm.stop();
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.api.management.RepositoryManager

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.