Examples of DatabaseImpl


Examples of org.apache.xindice.client.xmldb.DatabaseImpl

       }
      
       if ( commandClass != null ) {      
          try {
            // register Xindice Database with xml:db
            Database db = new DatabaseImpl();
  
            DatabaseManager.registerDatabase( db );
      
             // execute command class
             Command command = (Command)Class.forName( commandClass ).newInstance();
View Full Code Here

Examples of org.ethereum.db.DatabaseImpl

public class TrackDatabaseTest {
 
    @Test
    public void test1() {

        DatabaseImpl db1 = new DatabaseImpl("temp");
        TrackDatabase trackDatabase1 = new TrackDatabase(db1);

        trackDatabase1.put(Hex.decode("abcdef"), Hex.decode("abcdef"));
        byte[] value  = trackDatabase1.get(Hex.decode("abcdef"));
        assertEquals("abcdef", Hex.toHexString(value));

        trackDatabase1.startTrack();
        trackDatabase1.put(Hex.decode("abcdef"), Hex.decode("ffffff"));
        value  = trackDatabase1.get(Hex.decode("abcdef"));
        assertEquals("ffffff", Hex.toHexString(value));

        trackDatabase1.rollbackTrack();
        value  = trackDatabase1.get(Hex.decode("abcdef"));
        assertEquals("abcdef", Hex.toHexString(value));

        trackDatabase1.startTrack();
        trackDatabase1.put(Hex.decode("abcdef"), Hex.decode("ffffff"));
        trackDatabase1.commitTrack();
        value  = trackDatabase1.get(Hex.decode("abcdef"));
        assertEquals("ffffff", Hex.toHexString(value));

        db1.close();
    }
View Full Code Here

Examples of org.exist.xmldb.DatabaseImpl

            }

            BrokerPool.configure(1, 5, config);

            // register the XMLDB driver
            final Database xmldb = new DatabaseImpl();
            xmldb.setProperty("create-database", "false");
            DatabaseManager.registerDatabase(xmldb);

        } catch (final Exception e) {
            logger.error("configuration error: " + e.getMessage(), e);
            e.printStackTrace();
View Full Code Here

Examples of org.exolab.castor.jdo.engine.DatabaseImpl

         */
        
        if ((!_transactionManagerFactory.getName().equals (LocalTransactionManagerFactory.NAME )) &&
            (_transactionManager != null)) {
            Transaction        transaction;
            DatabaseImpl       dbImpl;

            try {
                transaction = _transactionManager.getTransaction();
                if ( _txDbPool != null && _txDbPool.containsTx (transaction))
                    return _txDbPool.get (transaction);
               
                if (transaction != null && transaction.getStatus() == Status.STATUS_ACTIVE) {
                    dbImpl = new DatabaseImpl( _dbName, _lockTimeout,
                            _callback, _instanceFactory, transaction, _classLoader, _autoStore);
                   
                    if (_txDbPool != null)
                        _txDbPool.put( transaction, dbImpl );
                   
                    transaction.registerSynchronization( dbImpl );
                    return dbImpl;
                }
            }
            catch (Exception except) {
                // NamingException, SystemException, RollbackException
                if (_logInterceptor != null)
                    _logInterceptor.exception( except );
            }
        }
       
        return new DatabaseImpl( _dbName, _lockTimeout,
                _callback, _instanceFactory, null, _classLoader, _autoStore );
    }
View Full Code Here

Examples of tosa.dbmd.DatabaseImpl

      List<IDatabase> dbs = new ArrayList<IDatabase>();
      System.out.println("***** Reading module with path " + module.getSourcePath());
      IDBDataSource dataSource = new DDLDBDataSource();
      Map<String, DBData> dbDataMap = dataSource.getDBData(module);
      for (Map.Entry<String, DBData> dbDataEntry : dbDataMap.entrySet()) {
        IDatabase database = new DatabaseImpl(dbDataEntry.getKey(), dbDataEntry.getValue(), module);
        // TODO - AHK - Validate things!
        dbs.add(database);
        _dbsByName.put(database.getNamespace(), database);
      }
      _dbsByModule.put(module, dbs);
    }
  }
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.