Package org.exist.xmldb

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


    @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

    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

    @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

    }

    @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

    @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

                  "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

    }

    @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;
    //System.out.println("tearDown PASSED");
View Full Code Here

    try
    {
      TestUtils.cleanupDB();
            if (!((CollectionImpl)testCollection).isRemoteCollection())
            {
                DatabaseInstanceManager dim = (DatabaseInstanceManager)testCollection.getService("DatabaseInstanceManager", "1.0");
                dim.shutdown();
            }
            testCollection = null;
        }
        catch(final XMLDBException e)
        {
View Full Code Here

    protected void tearDown() throws Exception {
        Collection root = DatabaseManager.getCollection(URI, "admin", null);
        CollectionManagementService service = (CollectionManagementService) root
                    .getService("CollectionManagementService", "1.0");
        service.removeCollection("test");
        DatabaseInstanceManager dim =
            (DatabaseInstanceManager) testCollection.getService("DatabaseInstanceManager", "1.0");
        dim.shutdown();
        testCollection = null;
        //System.out.println("tearDown PASSED");
    }
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.