Examples of DatabaseInstanceManager


Examples of org.exist.xmldb.DatabaseInstanceManager

    }

    @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

Examples of org.exist.xmldb.DatabaseInstanceManager

    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

Examples of org.exist.xmldb.DatabaseInstanceManager

   
    @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

Examples of org.exist.xmldb.DatabaseInstanceManager

            final Database database = (Database) cl.newInstance();
            DatabaseManager.registerDatabase(database);
            if (!uri.endsWith(XmldbURI.ROOT_COLLECTION))
                {uri = uri + XmldbURI.ROOT_COLLECTION;}
            final Collection root = DatabaseManager.getCollection(uri, user, passwd);
            final DatabaseInstanceManager manager = (DatabaseInstanceManager) root
                    .getService("DatabaseInstanceManager", "1.0");
            System.out.println("Shutting down database instance at ");
            System.out.println('\t' + uri);
            manager.shutdown();

        } catch (final XMLDBException e) {
            System.err.println("ERROR: " + e.getMessage());

            final Throwable t = e.getCause();
View Full Code Here

Examples of org.exist.xmldb.DatabaseInstanceManager

    @AfterClass
    public static void tearDown() throws XMLDBException {
        LOG.info("Shutting down");
        DatabaseManager.deregisterDatabase(database);
        DatabaseInstanceManager dim =
                (DatabaseInstanceManager) rootCollection.getService("DatabaseInstanceManager", "1.0");
        dim.shutdown();
    }
View Full Code Here

Examples of org.exist.xmldb.DatabaseInstanceManager

    collection.storeResource(document);
  }

  private static void shutdown(Collection collection) throws XMLDBException {
    //    shutdown the database gracefully
    DatabaseInstanceManager manager =
      (DatabaseInstanceManager) collection.getService("DatabaseInstanceManager", "1.0");
    manager.shutdown();
  }
View Full Code Here

Examples of org.exist.xmldb.DatabaseInstanceManager

    @AfterClass
    public static void after() {
        try {
            LOG.info("Stopping test..");
            DatabaseManager.deregisterDatabase(database);
            DatabaseInstanceManager dim = (DatabaseInstanceManager) rootCollection.getService("DatabaseInstanceManager", "1.0");
            dim.shutdown();
            database = null;

        } catch (Exception ex) {
            LOG.error(ex);
            fail(ex.getMessage());
View Full Code Here

Examples of org.exist.xmldb.DatabaseInstanceManager

    }

    @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

Examples of org.exist.xmldb.DatabaseInstanceManager

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

Examples of org.exist.xmldb.DatabaseInstanceManager

                  "CollectionManagementService",
                  "1.0");
          service.removeCollection(TEST_COLLECTION_NAME);
         
          DatabaseManager.deregisterDatabase(database);
          DatabaseInstanceManager dim =
              (DatabaseInstanceManager) testCollection.getService(
                  "DatabaseInstanceManager", "1.0");
          dim.shutdown();
            database = null;
            testCollection = null;
          System.out.println("tearDown PASSED");
    } catch (XMLDBException e) {
      fail(e.getMessage());
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.