Package org.apache.jackrabbit.mongomk.util

Examples of org.apache.jackrabbit.mongomk.util.MongoConnection


        }
    }

    @Override
    public void setUpCluster(MicroKernel[] cluster) throws Exception {
        MongoConnection connection = getMongoConnection();
        DB db = connection.getDB();
        dropCollections(db);

        for (int i = 0; i < cluster.length; i++) {
            cluster[i] = new MongoMK.Builder().
                    setMongoDB(db).setClusterId(i).open();
View Full Code Here


    protected MongoMK mk;

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        if (mongoAvailable == null) {
            MongoConnection mongoConnection = new MongoConnection(HOST, PORT, DB);
            try {
                mongoConnection.getDB().command(new BasicDBObject("ping", 1));
                mongoAvailable = Boolean.TRUE;
            } catch (Exception e) {
                mongoAvailable = Boolean.FALSE;
                mongoException = e;
            } finally {
                mongoConnection.close();
            }
        }
        Assume.assumeNoException(mongoException);
    }
View Full Code Here

        Assume.assumeNoException(mongoException);
    }

    @Before
    public void setUpConnection() throws Exception {
        mongoConnection = new MongoConnection(HOST, PORT, DB);
        dropCollections(mongoConnection.getDB());
        mk = new MongoMK.Builder().setMongoDB(mongoConnection.getDB()).open();
    }
View Full Code Here

    @After
    public void tearDownConnection() throws Exception {
        mk.dispose();
        // the db might already be closed
        mongoConnection.close();
        mongoConnection = new MongoConnection(HOST, PORT, DB);
        dropCollections(mongoConnection.getDB());
        mongoConnection.close();
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.mongomk.util.MongoConnection

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.