Package org.ozoneDB

Examples of org.ozoneDB.ExternalDatabase


        return serializer;
    }
   
    protected static void domStore( String id, Node doc ) throws Exception {
        String dbURI = "ozonedb:remote://localhost:3333";  
        ExternalDatabase db = ExternalDatabase.openDatabase(dbURI);
        XMLContainer container = XMLContainer.forName( db, id );
        if (container == null) {
            container = XMLContainer.newContainer( db, id );
        }
       
        ExternalTransaction tx = db.newTransaction();
        try {
            long start = System.currentTimeMillis();
    
            tx.begin();
            start = System.currentTimeMillis();                   
View Full Code Here


        if ( !acceptsURI( uri ) )
            throw new XMLDBException( ErrorCodes.INVALID_URI, "INVALID_URI" );

        Collection collection = null;
        try {
            ExternalDatabase db = null;
            StringBuffer ozoneDB = new StringBuffer();
            if ( getProperty( DB_HOST ) == null )
                ozoneDB.append( "ozonedb:local:").append( getProperty( DB_NAME ) );
            else
                ozoneDB.append( "ozonedb:remote://" ).append( getProperty( DB_HOST ) ).append(
                  ":").append( getProperty( DB_PORT ) );

            System.out.println("DatabaseImpl.getCollection() - Remote DB: " + getProperty(DB_HOST) + " " + getProperty(DB_PORT));
            System.out.println("DatabaseImpl.getCollection() - Local DB: " + getProperty(DB_NAME));
            System.out.println("DatabaseImpl.getCollection() - Load Collection: " + getProperty(COL_NAME));

            db = ExternalDatabase.openDatabase( ozoneDB.toString() );
            if (db == null)
                throw new XMLDBException( ErrorCodes.INVALID_DATABASE, "INVALID_DATABASE" );

            db.reloadClasses();

            collection = CollectionImpl.forName( db, getProperty( COL_NAME ) );

            if (collection == null)
                throw new XMLDBException( ErrorCodes.INVALID_COLLECTION, "INVALID_COLLECTION" );
View Full Code Here

TOP

Related Classes of org.ozoneDB.ExternalDatabase

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.