Package org.exist.storage

Examples of org.exist.storage.DBBroker.removeCollection()


            assertNotNull(transaction);
            System.out.println("Transaction started ...");

            Collection root = broker.getOrCreateCollection(transaction, TestConstants.TEST_COLLECTION_URI);
            assertNotNull(root);
            broker.removeCollection(transaction, root);

            Collection config = broker.getOrCreateCollection(transaction,
                XmldbURI.create(CollectionConfigurationManager.CONFIG_COLLECTION + "/db"));
            assertNotNull(config);
            broker.removeCollection(transaction, config);
View Full Code Here


            broker.removeCollection(transaction, root);

            Collection config = broker.getOrCreateCollection(transaction,
                XmldbURI.create(CollectionConfigurationManager.CONFIG_COLLECTION + "/db"));
            assertNotNull(config);
            broker.removeCollection(transaction, config);
           
            transact.commit(transaction);
        } catch (Exception e) {
          transact.abort(transaction);
            e.printStackTrace();
View Full Code Here

                txnManager.abort(txn);
                return;
            }

            // Remove collection
            broker.removeCollection(txn, collection);

            // Commit change
            txnManager.commit(txn);

            if(LOG.isDebugEnabled())
View Full Code Here

            transact = pool.getTransactionManager();
            txn = transact.beginTransaction();

            Collection testCollection = broker.getOrCreateCollection(txn, XmldbURI.create(VALIDATION_HOME_COLLECTION_URI));
            broker.removeCollection(txn, testCollection);

            transact.commit(txn);

        } catch (Exception e) {
            if(transact != null && txn != null) {
View Full Code Here

            assertNotNull(transaction);
            System.out.println("Transaction started ...");

            Collection root = broker.getOrCreateCollection(transaction, col1uri);
            assertNotNull(root);
            broker.removeCollection(transaction, root);

            transact.commit(transaction);
        } catch (Exception e) {
          transact.abort(transaction);
            e.printStackTrace();
View Full Code Here

                return false;
            }
            // keep the write lock in the transaction
            transaction.registerLock(collection.getLock(), Lock.WRITE_LOCK);
            LOG.debug("removing collection " + collURI);
            final boolean removed = broker.removeCollection(transaction, collection);
            transact.commit(transaction);
            return removed;

        } catch (final Throwable e) {
            transact.abort(transaction);
View Full Code Here

            assertNotNull(transaction);           
            System.out.println("BasicNodeSetTest#tearDown >>>");
           
            root = broker.getOrCreateCollection(transaction, XmldbURI.create(XmldbURI.ROOT_COLLECTION + "/test"));
            assertNotNull(root);
            broker.removeCollection(transaction, root);
           
            transact.commit(transaction);
        } catch (Exception e) {
          transact.abort(transaction);
            e.printStackTrace();
View Full Code Here

            assertNotNull(transaction);           
            System.out.println("BasicNodeSetTest#tearDown >>>");
           
            root = broker.getOrCreateCollection(transaction, XmldbURI.create(XmldbURI.ROOT_COLLECTION + "/test"));
            assertNotNull(root);
            broker.removeCollection(transaction, root);
           
            transact.commit(transaction);
        } catch (Exception e) {
          transact.abort(transaction);
            e.printStackTrace();
View Full Code Here

            transact = pool.getTransactionManager();
            txn = transact.beginTransaction();

            org.exist.collections.Collection testCollection = broker.getOrCreateCollection(txn, XmldbURI.create(VALIDATION_HOME_COLLECTION_URI));
            broker.removeCollection(txn, testCollection);

            transact.commit(txn);
        } catch (Exception e) {
            if(transact != null && txn != null) {
                transact.abort(txn);
View Full Code Here

            txnManager = pool.getTransactionManager();
            txn = txnManager.beginTransaction();

            col1 = broker.openCollection(col1uri, Lock.WRITE_LOCK);
            if(col1 != null) {
              broker.removeCollection(txn, col1);
            }

            col2 = broker.openCollection(col2uri, Lock.WRITE_LOCK);
            if(col2 != null) {
              broker.removeCollection(txn, col2);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.