Package org.atomojo.app.db

Examples of org.atomojo.app.db.DB.connect()


                  DB db = new DB(getLogger(),new File(dbDir,dbName));
                  dbinfo = new DBInfo(dbName,db,auth,groupT!=null ?  groupT.getFirstValue() : null, aliasT!=null ? aliasT.getFirstValue() : null);
                  storage = storageFactory.getStorage(db);
                  try {
                     getLogger().info("Connecting to DB "+dbName);
                     db.connect();
                     getLogger().info("Connected to DB "+dbName);
                     autodbList.put(dbName,dbinfo);
                     storage.start();
                  } catch (SQLException ex) {
                     getLogger().log(Level.SEVERE,"Cannot connect to database "+dbName,ex);
View Full Code Here


         }
         System.out.println("Connecting to databases...");
         // Connect to all databases
         for (DB db : dbList.values()) {
            System.out.println("Connecting to DB "+db.getName());
            db.connect();
         }
        
        
         System.out.println("Starting server...");
View Full Code Here

   public Representation get() {
      final DB db = (DB)getRequest().getAttributes().get(App.DB_ATTR);
      final Storage storage = (Storage)getRequest().getAttributes().get(App.STORAGE_ATTR);
      try {
         db.stop();
         db.connect();
         getResponse().setStatus(Status.SUCCESS_OK);
         Representation rep = new StringRepresentation("<success xmlns='"+AdminXML.NAMESPACE+"'/>",MediaType.APPLICATION_XML);
         rep.setCharacterSet(CharacterSet.UTF_8);
         return rep;
      } catch (Exception ex) {
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.