Package org.apache.jackrabbit.core.util.db

Examples of org.apache.jackrabbit.core.util.db.ConnectionFactory


        //        "jdbc:derby:" + TEST_DIR + "/db;create=true",
        //        "sa", "sa");
    }

    private void doTestDatabase(String driver, String url, String user, String password) throws Exception {
        ConnectionFactory pool = new ConnectionFactory();
        try {
            DbDataStore store = new DbDataStore();
            store.setConnectionFactory(pool);

            ids.clear();

            store.setDriver(driver);
            store.setUrl(url);
            store.setUser(user);
            store.setPassword(password);

            store.init("target/test-db-datastore");
            store.setMinRecordLength(0);
            doTest(store);
        } finally {
            pool.close();
        }
    }
View Full Code Here


    public void testDerbyDatabasePersistenceManager() throws Exception {
        org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager manager =
            new org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager();
        manager.setDriver("org.apache.derby.jdbc.EmbeddedDriver");
        manager.setUrl("jdbc:derby:" + database.getPath() + ";create=true");
        manager.setConnectionFactory(new ConnectionFactory());
        assertPersistenceManager(manager);
    }
View Full Code Here

    public void testDerbyPoolPersistenceManager() throws Exception {
        org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager manager =
            new org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager();
        manager.setDriver("org.apache.derby.jdbc.EmbeddedDriver");
        manager.setUrl("jdbc:derby:" + database.getPath() + ";create=true");
        manager.setConnectionFactory(new ConnectionFactory());
        assertPersistenceManager(manager);
    }
View Full Code Here

    public void testH2PoolPersistenceManager() throws Exception {
        org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager manager =
            new org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager();
        manager.setDriver("org.h2.Driver");
        manager.setUrl("jdbc:h2:mem:" + database.getPath());
        manager.setConnectionFactory(new ConnectionFactory());
        assertPersistenceManager(manager);
    }
View Full Code Here

    }

    protected void setUp() throws Exception {
        file = File.createTempFile("jackrabbit", "derbyfs");
        file.delete();
        conFac = new ConnectionFactory();
        super.setUp();
    }
View Full Code Here

public class OracleRetrocompatibleFileSystemTest extends AbstractFileSystemTest {
    private ConnectionFactory connectionFactory;

    @Override
    protected FileSystem getFileSystem() throws Exception {
        connectionFactory = new ConnectionFactory();
        final OracleFileSystem fs = new OracleFileSystem();
        fs.setConnectionFactory(connectionFactory);
        fs.setUrl(System.getProperty("tests.oracle.url"));
        fs.setUser(System.getProperty("tests.oracle.user"));
        fs.setPassword(System.getProperty("tests.oracle.password"));
View Full Code Here

public class OracleFileSystemTest extends AbstractFileSystemTest {
    private ConnectionFactory connectionFactory;

    @Override
    protected FileSystem getFileSystem() throws Exception {
        connectionFactory = new ConnectionFactory();
        final OracleFileSystem fs = new OracleFileSystem();
        fs.setConnectionFactory(connectionFactory);
        fs.setUrl(System.getProperty("tests.oracle.url"));
        fs.setUser(System.getProperty("tests.oracle.user"));
        fs.setPassword(System.getProperty("tests.oracle.password"));
View Full Code Here

     * Creates a new configuration parser with the given parser variables.
     *
     * @param variables parser variables
     */
    public RepositoryConfigurationParser(Properties variables) {
        this(variables, new ConnectionFactory());
    }
View Full Code Here

            throws ConfigurationException {
        Properties variables = new Properties(System.getProperties());
        variables.setProperty(
                RepositoryConfigurationParser.REPOSITORY_HOME_VARIABLE, home);
        RepositoryConfigurationParser parser =
            new RepositoryConfigurationParser(variables, new ConnectionFactory());

        RepositoryConfig config = parser.parseRepositoryConfig(xml);
        config.init();

        return config;
View Full Code Here

     * Creates a new configuration parser with the given parser variables.
     *
     * @param variables parser variables
     */
    public RepositoryConfigurationParser(Properties variables) {
        this(variables, new ConnectionFactory());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.util.db.ConnectionFactory

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.