Package org.exist.xmldb

Examples of org.exist.xmldb.DatabaseInstanceManager


  /*
   * @see TestCase#tearDown()
   */
  protected void tearDown() throws Exception {
    DatabaseManager.deregisterDatabase(database);
    DatabaseInstanceManager dim =
      (DatabaseInstanceManager) root.getService("DatabaseInstanceManager", "1.0");
    dim.shutdown();
    //System.out.println("tearDown PASSED");
  }
View Full Code Here


        //delete the test collection
        Collection root = DatabaseManager.getCollection(ROOT_URI, ADMIN_UID, ADMIN_PWD);
        CollectionManagementService cms = (CollectionManagementService)root.getService("CollectionManagementService", "1.0");
        cms.removeCollection(TEST_COLLECTION);

        DatabaseInstanceManager dim = (DatabaseInstanceManager) root.getService("DatabaseInstanceManager", "1.0");
        dim.shutdown();
    }
View Full Code Here

  }
 
  private static void shutdown() {
    if (rootCollection != null) {
      try {
        DatabaseInstanceManager dim =
            (DatabaseInstanceManager) rootCollection.getService("DatabaseInstanceManager", "1.0");
        dim.shutdown();
      } catch (Exception e) {
        e.printStackTrace();
        fail(e.getMessage());
      }
    }
View Full Code Here

  /*
   * @see TestCase#tearDown()
   */
  protected void tearDown() throws Exception {
    DatabaseManager.deregisterDatabase(database);
    DatabaseInstanceManager dim =
      (DatabaseInstanceManager) root.getService("DatabaseInstanceManager", "1.0");
    dim.shutdown();
       
        // clear instance variables
        service = null;
        root = null;
    //System.out.println("tearDown PASSED");
View Full Code Here

    @After
    public void tearDownAfter() {
        if (rootCollection != null) {
            try {
                DatabaseInstanceManager dim =
                        (DatabaseInstanceManager) rootCollection.getService(
                        "DatabaseInstanceManager", "1.0");
                dim.shutdown();
            } catch (Exception e) {
                e.printStackTrace();
                fail(e.getMessage());
            }
        }
View Full Code Here

    private void shutdownDb() throws XMLDBException {
        for (Connection connection : connections.values()) {
            CollectionImpl collection = (CollectionImpl) connection.getCollection("/db");
            if (!collection.isRemoteCollection()) {
                DatabaseInstanceManager mgr = (DatabaseInstanceManager)
                        collection.getService("DatabaseInstanceManager", "1.0");
                mgr.shutdown();
            }
        }
    }
View Full Code Here


    @After
    public void tearDown() throws Exception {
        DatabaseManager.deregisterDatabase( database );
        DatabaseInstanceManager dim = (DatabaseInstanceManager)root.getService( "DatabaseInstanceManager", "1.0" );
        dim.shutdown();

        // clear instance variables
        service = null;
        root    = null;
    }
View Full Code Here

    }

    @AfterClass
    public static void tearDownClass() throws Exception {
        DatabaseManager.deregisterDatabase(database);
        DatabaseInstanceManager dim =
                (DatabaseInstanceManager) root.getService(
                "DatabaseInstanceManager", "1.0");
        dim.shutdown();
        database = null;

        System.out.println("tearDown PASSED");
    }
View Full Code Here

    private static void shutdown(String adminPass) {
        System.out.println("--- Initialization complete. Shutdown embedded database instance ---");
        try {
            final Collection root = DatabaseManager.getCollection(URI, "admin", adminPass);
            final DatabaseInstanceManager manager = (DatabaseInstanceManager)
                    root.getService("DatabaseInstanceManager", "1.0");
            manager.shutdown();
        } catch (final XMLDBException e) {
            System.err.println("Caught an exception while initializing db: " + e.getMessage());
            e.printStackTrace();
        }
    }
View Full Code Here

   
    @After
    public void tearDown() throws Exception {
        TestUtils.cleanupDB();
        if (!((CollectionImpl) testCollection).isRemoteCollection()) {
            DatabaseInstanceManager dim =
                    (DatabaseInstanceManager) testCollection.getService(
                    "DatabaseInstanceManager", "1.0");
            dim.shutdown();
        }
        testCollection = null;
    }
View Full Code Here

TOP

Related Classes of org.exist.xmldb.DatabaseInstanceManager

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.