Package org.exist.storage.txn

Examples of org.exist.storage.txn.Txn


    @AfterClass
    public static void closeDB() {
        BrokerPool pool = null;
        DBBroker broker = null;
        TransactionManager transact = null;
        Txn transaction = null;
        try {
            pool = BrokerPool.getInstance();
            assertNotNull(pool);
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            assertNotNull(broker);
View Full Code Here


    }

    private void configureAndStore(String config, String xml) {
        DBBroker broker = null;
        TransactionManager transact = null;
        Txn transaction = null;
        try {
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            assertNotNull(broker);
            transact = pool.getTransactionManager();
            assertNotNull(transact);
View Full Code Here

    private static void createTestCollections() throws Exception {

        BrokerPool pool = BrokerPool.getInstance();
        DBBroker broker = null;
        TransactionManager transact = null;
        Txn txn = null;
        try {
            Subject admin = pool.getSecurityManager().authenticate(ADMIN_UID, ADMIN_PWD);

            broker = pool.get(admin);
View Full Code Here

    private static void removeTestCollections() throws Exception {

        BrokerPool pool = BrokerPool.getInstance();
        DBBroker broker = null;
        TransactionManager transact = null;
        Txn txn = null;
        try {
            Subject admin = pool.getSecurityManager().authenticate(ADMIN_UID, ADMIN_PWD);

            broker = pool.get(admin);
View Full Code Here

            Configuration config = new Configuration();
            BrokerPool.configure(1, 5, config);
            pool = BrokerPool.getInstance();

            TransactionManager transact = pool.getTransactionManager();
            Txn transaction = transact.beginTransaction();
            broker = pool.get(pool.getSecurityManager().getSystemSubject());

            Collection root = broker.getOrCreateCollection(transaction, TEST_COLLECTION_URI);
            broker.saveCollection(transaction, root);
View Full Code Here

    @AfterClass
    public static void shutdown() {
        DBBroker broker = null;
        try {
            TransactionManager transact = pool.getTransactionManager();
            Txn transaction = transact.beginTransaction();
            broker = pool.get(pool.getSecurityManager().getSystemSubject());

            Collection root = broker.getOrCreateCollection(transaction, TEST_COLLECTION_URI);
            broker.removeCollection(transaction, root);
            transact.commit(transaction);
View Full Code Here

    public void dropSingleDoc() {
        System.out.println("Test removal of single document ...");
        DocumentSet docs = configureAndStore(COLLECTION_CONFIG1, XML1, "dropDocument.xml");
        DBBroker broker = null;
        TransactionManager transact = null;
        Txn transaction = null;
        try {
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            assertNotNull(broker);
            transact = pool.getTransactionManager();
            assertNotNull(transact);
View Full Code Here

    public void dropDocuments() {
        System.out.println("Test removal of multiple documents ...");
        configureAndStore(COLLECTION_CONFIG1, "samples/shakespeare");
        DBBroker broker = null;
        TransactionManager transact = null;
        Txn transaction = null;
        try {
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            assertNotNull(broker);
            transact = pool.getTransactionManager();
            assertNotNull(transact);
View Full Code Here

    public void removeCollection() {
        System.out.println("Test removal of collection ...");
        DocumentSet docs = configureAndStore(COLLECTION_CONFIG1, "samples/shakespeare");
        DBBroker broker = null;
        TransactionManager transact = null;
        Txn transaction = null;
        try {
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            assertNotNull(broker);
            transact = pool.getTransactionManager();
            assertNotNull(transact);
View Full Code Here

    @Test
    public void xupdateRemove() {
        DocumentSet docs = configureAndStore(COLLECTION_CONFIG2, XML2, "xupdate.xml");
        DBBroker broker = null;
        TransactionManager transact = null;
        Txn transaction = null;
        try {
          broker = pool.get(pool.getSecurityManager().getSystemSubject());
            transact = pool.getTransactionManager();
            transaction = transact.beginTransaction();
View Full Code Here

TOP

Related Classes of org.exist.storage.txn.Txn

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.