Package org.exist.storage

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


              broker.removeCollection(txn, col1);
            }

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

          txnManager.commit(txn);
        } catch (Exception e) {
          txnManager.abort(txn);
View Full Code Here


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

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

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

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

            Collection col = broker.getOrCreateCollection(txn, col1uri);
            assertNotNull(col);
          broker.removeCollection(txn, col);

//            col = broker.getOrCreateCollection(txn, col2uri);
//            assertNotNull(col);
//          broker.removeCollection(txn, col);
View Full Code Here

//            assertNotNull(col);
//          broker.removeCollection(txn, col);

            col = broker.getOrCreateCollection(txn, col3uri);
            assertNotNull(col);
          broker.removeCollection(txn, col);

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

          System.out.println("DELETE...");
            final TransactionManager txnManager = pool.getTransactionManager();
            final Txn txn = txnManager.beginTransaction();
          try {
              broker.removeCollection(txn, col1);
              txnManager.commit(txn);
          } catch (Exception e) {
              e.printStackTrace();
              txnManager.abort(txn);
              fail(e.getMessage());
View Full Code Here

//            assertNotNull(col);
//          broker.removeCollection(txn, col);

            col = broker.getOrCreateCollection(txn, col3uri);
            assertNotNull(col);
          broker.removeCollection(txn, col);

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

                transact.abort(transaction);
              throw new XMLDBException(ErrorCodes.INVALID_COLLECTION,
                  "Collection " + collName + " not found");
            }
            LOG.debug( "removing collection " + collName );
            broker.removeCollection(transaction, collection);
            transact.commit(transaction);
        } catch ( final EXistException e ) {
            transact.abort(transaction);
          e.printStackTrace();
            throw new XMLDBException( ErrorCodes.VENDOR_ERROR,
View Full Code Here

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

            Collection col = broker.getOrCreateCollection(txn, col1uri);
            assertNotNull(col);
          broker.removeCollection(txn, col);

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

              txnManager = pool.getTransactionManager();
              assertNotNull(txnManager);
              txn = txnManager.beginTransaction();
              assertNotNull(txn);
             
              broker.removeCollection(txn, col);
           
              txnManager.commit(txn);
          } catch (Exception e) {
              e.printStackTrace();
              txnManager.abort(txn);
View Full Code Here

      transact = pool.getTransactionManager();
      assertNotNull(transact);
      transaction = transact.beginTransaction();

            test = broker.openCollection(uri, Lock.WRITE_LOCK);
            broker.removeCollection(transaction, test);
            transact.commit(transaction);
        } catch (Exception e) {
      transact.abort(transaction);
      e.printStackTrace();
    } finally {
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.