Package org.ozoneDB

Examples of org.ozoneDB.ExternalTransaction.commit()


            else
                container.storeDOM( null, doc );
            System.out.println( "DOM store: store time: " + (System.currentTimeMillis() - start) + " ms" );
           
            start = System.currentTimeMillis();
            tx.commit();
            System.out.println( "DOM store: commit time: " + (System.currentTimeMillis() - start) + " ms" );
        } catch (Exception e) {
            tx.rollback();
            throw e;
        }
View Full Code Here


            adapter.setContentHandler( container.storeSAX() );
            adapter.parse( filename );
            System.out.println( "SAX store: parse+store time: " + (System.currentTimeMillis() - start) + " ms" );
           
            start = System.currentTimeMillis();
            tx.commit();
            System.out.println( "SAX store: commit time: " + (System.currentTimeMillis() - start) + " ms" );
        } catch (Exception e) {
            tx.rollback();
            throw e;
        }
View Full Code Here

                        start = System.currentTimeMillis();
                        Document doc = documentBuilder.newDocument();
                        Node extractedNode = container.extractDOM( doc, nodeList.item( i ), null, depth );
                        System.out.println( "[extract time: " + (System.currentTimeMillis() - start) + " ms]" );
                       
                        tx.commit();
                       
                        printNodeTree( extractedNode, new StringBuffer( "        " ) );
                    }
                    break;
                default:
View Full Code Here

            long start = System.currentTimeMillis();
            container.extractSAX( serializer.asContentHandler(), null, depth );
            System.out.println( "Dump: extract/serialize time: " + (System.currentTimeMillis() - start) + " ms" );
           
            writer.close();
            tx.commit();
        } catch (Exception e) {
            tx.rollback();
            throw e;
        }
    }
View Full Code Here

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

            System.out.println( "Print: extract DOM time: " + (System.currentTimeMillis() - start) + " ms" );
            tx.commit();
        }
        catch (Exception e) {
            tx.rollback();
            throw e;
        }
View Full Code Here

            start = System.currentTimeMillis();                   
            container.storeDOM( null, doc );
            System.out.println( "DOM store: store time: " + (System.currentTimeMillis() - start) + " ms" );
           
            start = System.currentTimeMillis();
            tx.commit();
            System.out.println( "DOM store: commit time: " + (System.currentTimeMillis() - start) + " ms" );
        } catch (Exception e) {
            tx.rollback();
            throw e;
        }
View Full Code Here

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

        ExternalTransaction tx = db.newTransaction();
        try {
            tx.begin();
            XMLContainer container = XMLContainer.newContainer(db, xmlTestDataFileName);
            container.storeDOM(getTestDocument());
            tx.commit();
        } catch (Exception e) {
            try {
                tx.rollback();
            } catch (Exception e1) {
                // leave it for finally
View Full Code Here

            XMLContainer container = XMLContainer.forName(db, xmlTestDataFileName);
            if (container == null) {
                fail("XML2ObjTest.removeDocument() - No such document " + xmlTestDataFileName);
            }
            container.delete();
            tx.commit();
            assertNull(XMLContainer.forName(db, xmlTestDataFileName));
        } catch (Exception e) {
            try {
                tx.rollback();
            } catch (Exception e1) {
View Full Code Here

                SAXParser parser = parserFactory.newSAXParser();
                ParserAdapter adapter = new ParserAdapter( parser.getParser() );
                tx.begin();
                adapter.setContentHandler( container.storeSAX() );
                adapter.parse( source );
                tx.commit();
            }
            catch (SAXException e) {
                try {
                    if (tx.getStatus() == tx.STATUS_ACTIVE)
                        tx.rollback();
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.