Search in sources :

Example 6 with DatabaseImpl

use of org.exist.xmldb.DatabaseImpl in project exist by eXist-db.

the class DeepEmbeddedBackupRestoreTest method registerXmldbDatabaseDriver.

@BeforeClass
public static void registerXmldbDatabaseDriver() throws XMLDBException {
    final DatabaseImpl databaseImpl = new DatabaseImpl();
    DatabaseManager.registerDatabase(databaseImpl);
}
Also used : DatabaseImpl(org.exist.xmldb.DatabaseImpl) BeforeClass(org.junit.BeforeClass)

Example 7 with DatabaseImpl

use of org.exist.xmldb.DatabaseImpl in project exist by eXist-db.

the class CopyCollectionRecoveryTest method storeAndReadXmldb.

@Test
public void storeAndReadXmldb() throws DatabaseConfigurationException, XMLDBException, EXistException, IOException {
    // initialize xml:db driver
    final Database database = new DatabaseImpl();
    database.setProperty("create-database", "true");
    DatabaseManager.registerDatabase(database);
    BrokerPool.FORCE_CORRUPTION = false;
    xmldbStore();
    existEmbeddedServer.restart();
    BrokerPool.FORCE_CORRUPTION = false;
    xmldbRead();
}
Also used : DatabaseImpl(org.exist.xmldb.DatabaseImpl) Database(org.xmldb.api.base.Database) Test(org.junit.Test)

Aggregations

DatabaseImpl (org.exist.xmldb.DatabaseImpl)7 Database (org.xmldb.api.base.Database)6 Test (org.junit.Test)3 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 java.net (java.net)1 Path (java.nio.file.Path)1 ContextHandler (org.eclipse.jetty.server.handler.ContextHandler)1 ServletContextHandler (org.eclipse.jetty.servlet.ServletContextHandler)1 ServletHolder (org.eclipse.jetty.servlet.ServletHolder)1 MultiException (org.eclipse.jetty.util.MultiException)1 XmlConfiguration (org.eclipse.jetty.xml.XmlConfiguration)1 ExistExtensionServlet (org.exist.http.servlets.ExistExtensionServlet)1 StartException (org.exist.start.StartException)1 SingleInstanceConfiguration (org.exist.util.SingleInstanceConfiguration)1 BeforeClass (org.junit.BeforeClass)1 Collection (org.xmldb.api.base.Collection)1 Resource (org.xmldb.api.base.Resource)1 XMLResource (org.xmldb.api.modules.XMLResource)1