Package com.dbxml.db.core

Examples of com.dbxml.db.core.Database


  
   public static final String[] PARAMS_shutdown = {"exitCode"};

   public void shutdown(int exitCode) throws DBException {
    // Do an access control check
    Database db = Database.getInstance();
    if ( db != null ) {
      Collection col = db.getSystemCollection();
      String path = col.getCanonicalName();
      db.getSecurityManager().access(path, Access.EXECUTE);
    }
    server.shutDown(exitCode);
   }
View Full Code Here


      }
   }

   private ObjectInstance getContent(ID id) throws DBException {
    String name = id.toString();
    Database db = Database.getInstance();
    int idx = name.lastIndexOf('/');
    String colName = name.substring(0, idx);
    Collection col = db.getCollection(colName);
    String docName = name.substring(idx + 1);

    Transaction tx = new Transaction();
    try {
      Container c = col.getContainer(tx, docName);
View Full Code Here

   public void shutdown(int exitCode) throws dbXMLException {
      /** @todo Should this method do anything? */
   }

   public CollectionClient getDatabase() throws dbXMLException {
      Database db = Database.getInstance();
      if ( db != null )
         return new CollectionClientImpl(this, db);
      else
         throw new dbXMLException("Database not found");
   }
View Full Code Here

   public AccessManager() {
   }

   public void setCollection(Collection collection) {
      super.setCollection(collection);
      Database database = collection.getDatabase();
      utils = new AccessUtils(database);
   }
View Full Code Here

         throw new dbXMLException("Only one Database instance allowed per Server");
   }

   public synchronized int initialize() {
      try {
         Database db = new Database();
         db.setConfig(config);
         SecurityManager security = db.getSecurityManager();

      if ( !(security instanceof NoSecurityManager) ) {
        Filter authFilter = new BasicAuthFilter(security);
        Broker.getInstance().addFilter(authFilter);
      }
View Full Code Here

      return RESULT_OK;
   }

   public void dispose() {
      Database db = Database.getInstance();
      if ( db != null )
         db.dispose();
   }
View Full Code Here

TOP

Related Classes of com.dbxml.db.core.Database

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.