Package org.ozoneDB

Examples of org.ozoneDB.ExternalTransaction.begin()


                out.println ("Unknow argument: " + arg);
            }
        }

        ExternalTransaction tx = db.newTransaction();
        tx.begin();
        try {
            admin.beginBackup();

            OutputStream out = System.out;
            if (!filename.equals( "-" )) {
View Full Code Here


            else
                return;
        }
       
        ExternalTransaction tx = db.newTransaction();
        tx.begin();
        try {
            long start;
            if (newDoc) {
                start = System.currentTimeMillis();
                container = XMLContainer.newContainer( db, filename );
View Full Code Here

            System.out.println( "Document already found in Database." );
            return;
        }
       
        ExternalTransaction tx = db.newTransaction();
        tx.begin();
        try {
            long start = System.currentTimeMillis();
            container = XMLContainer.newContainer( db, filename );
            System.out.println( "SAX store: new container time: " + (System.currentTimeMillis() - start) + " ms" );
           
View Full Code Here

                    DocumentBuilder documentBuilder = builderFactory.newDocumentBuilder();
                    for (int i = 0; i < nodeList.getLength(); i++) {
                        System.out.print( i + 1 + " Entry: " );
                       
                        ExternalTransaction tx = db.newTransaction();
                        tx.begin();

                        // extract the result node from the persistent document first
                        start = System.currentTimeMillis();
                        Document doc = documentBuilder.newDocument();
                        Node extractedNode = container.extractDOM( doc, nodeList.item( i ), null, depth );
View Full Code Here

            System.out.println( "No such document." );
            return;
        }
       
        ExternalTransaction tx = db.newTransaction();
        tx.begin();
        try {
            PrintWriter writer = new PrintWriter( System.out, false );
            if (targetFile != null) {
                writer = new PrintWriter( new FileOutputStream( targetFile ), false );
            }
View Full Code Here

        DocumentBuilder documentBuilder = builderFactory.newDocumentBuilder();
        Document doc = documentBuilder.newDocument();
        Node resultNode = null;
       
        ExternalTransaction tx = db.newTransaction();
        tx.begin();
        try {
            long start = System.currentTimeMillis();

            resultNode = container.extractDOM( doc, (Node)null /*container.getPDocument().getFirstChild()*/, null, depth );
            System.out.println( "Print: with depth: " + depth );
View Full Code Here

       
        ExternalTransaction tx = db.newTransaction();
        try {
            long start = System.currentTimeMillis();
    
            tx.begin();
            start = System.currentTimeMillis();                   
            container.storeDOM( null, doc );
            System.out.println( "DOM store: store time: " + (System.currentTimeMillis() - start) + " ms" );
           
            start = System.currentTimeMillis();
View Full Code Here

        insertDocument();
        ExternalTransaction tx = db.newTransaction();
        try {
            XMLContainer container = XMLContainer.forName(db, xmlTestDataFileName);
            assertNotNull(container);
            tx.begin();
            container.storeDOM(null, getTestDocument());
            tx.commit();
            removeDocument();
        } catch (Exception e) {
            try {
View Full Code Here

    }

    private void insertDocument() {
        ExternalTransaction tx = db.newTransaction();
        try {
            tx.begin();
            XMLContainer container = XMLContainer.newContainer(db, xmlTestDataFileName);
            container.storeDOM(getTestDocument());
            tx.commit();
        } catch (Exception e) {
            try {
View Full Code Here

        }
    }
    private void removeDocument() {
        ExternalTransaction tx = db.newTransaction();
        try {
            tx.begin();
            XMLContainer container = XMLContainer.forName(db, xmlTestDataFileName);
            if (container == null) {
                fail("XML2ObjTest.removeDocument() - No such document " + xmlTestDataFileName);
            }
            container.delete();
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.