Examples of DbInfo


Examples of com.sun.ejb.sqlgen.DBInfo

    * with default generated SQL statements for the persistent methods from the datdbases running
    * on the given server. Use overwrite to desructively overwrite existing SQL statements.
    */
    public void doGenerateSQL(String applicationFilename, String serverName, boolean overWrite) throws Exception
    {
  DBInfo dbInfo = this.getServerManager().getDBInfo(serverName);
  Application application = ApplicationArchivist.openAT(                  //bug# 4774785; 4691307
            new File(applicationFilename));

  Iterator itr = application.getEjbBundleDescriptors().iterator();
  while ( itr.hasNext() ) {
View Full Code Here

Examples of com.sun.ejb.sqlgen.DBInfo

      String corbaName = "corbaname:iiop:" + serverName + ":" + // NOI18N
                initialPort + "#" + DBInfo.JNDI_NAME; // NOI18N

            Object objref  = getIC().lookup(corbaName);
            Object o = PortableRemoteObject.narrow(objref, DBInfo.class);
      DBInfo info = (DBInfo) o;
      return info;
  } catch (Throwable t) {
      throw new ServerException(localStrings.getLocalString(
    "enterprise.tools.deployment.main.couldnotgetdbinfofromserver",
    "Could not get db info from the J2EE server {0}",
View Full Code Here

Examples of net.lr.tutorial.karaf.db.service.DbInfo

        table.header.add("Product");
        table.header.add("Version");
        table.header.add("URL");
        for (ServiceReference ref : dataSources) {
            List<String> row = table.addRow();
            DbInfo info = dbSelect.getDataSourceInfo(ref);
            row.add(info.selected ? "*" : "");
            row.add(info.jndiName);
            row.add(info.product);
            row.add(info.version);
            row.add(info.url);
View Full Code Here

Examples of net.lr.tutorial.karaf.db.service.DbInfo

        table.header.add("Product");
        table.header.add("Version");
        table.header.add("URL");
        for (ServiceReference ref : dataSources) {
            List<String> row = table.addRow();
            DbInfo info = dbSelect.getDataSourceInfo(ref);
            row.add(info.selected ? "*" : "");
            row.add(info.jndiName);
            row.add(info.product);
            row.add(info.version);
            row.add(info.url);
View Full Code Here

Examples of net.lr.tutorial.karaf.db.service.DbInfo

        table.header.add("Product");
        table.header.add("Version");
        table.header.add("URL");
        for (ServiceReference ref : dataSources) {
            List<String> row = table.addRow();
            DbInfo info = dbAccess.getDataSourceInfo(ref);
            row.add(info.selected ? "*" : "");
            row.add(info.jndiName);
            row.add(info.product);
            row.add(info.version);
            row.add(info.url);
View Full Code Here

Examples of org.atomojo.app.db.DBInfo

            if (service==null) {
               getLogger().severe("Cannot find auth service "+databaseConf.getAuthName()+" for database "+adminDB.getName());
               continue;
            }
         }
         DBInfo dbinfo = new DBInfo(adminDB.getName(),adminDB,service,databaseConf==null ? null : databaseConf.getGroup(),databaseConf==null ? null : databaseConf.getGroupAlias());
         dbConfList.put(dbinfo.getName(),dbinfo);
         UserGuard adminGuard = new UserGuard(childContext,ChallengeScheme.HTTP_BASIC,"Atom Administrator",service);
         adminGuard.getRequiredGroups().add(AuthService.ADMIN_GROUP);

         try {
            adminGuard.setNext(new AdminApplication(childContext,adminDB,storageFactory.getStorage(adminDB),AtomApplication.RESOURCE_BASE));
View Full Code Here

Examples of org.atomojo.app.db.DBInfo

   }
  
   protected void configure(VirtualHost vhost,ServerConfiguration.Host host)
      throws Exception
   {
      DBInfo atomDB = dbConfList.get(host.getDatabaseName());
      if (atomDB==null) {
         atomDB = autodbList.get(host.getDatabaseName());
      }
      if (atomDB==null) {
         throw new RuntimeException("Database "+host.getDatabaseName()+" does not exist.");
      }
      AuthService auth = atomDB.getAuthService();
      if (auth==null) {
         throw new RuntimeException("The auth service for database "+host.getDatabaseName()+" does not exist.");
      }
     
      Storage storage = storageFactory.getStorage(atomDB.getDB());


      Restlet adminApp = admins.get(atomDB.getName());
      if (adminApp==null) {
         getLogger().warning("There is no admin restlet for "+atomDB.getName());
      }
     
      AtomApplication app = new AtomApplication(childContext,auth,atomDB.getDB(),storage,host.allowQueries());

      Router router = new Router(childContext);
      router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
      router.attachDefault(app);
      router.attach("/admin",adminApp).getTemplate().setMatchingMode(Template.MODE_STARTS_WITH);
View Full Code Here

Examples of org.atomojo.app.db.DBInfo

               }
               if (auth==null) {
                  getLogger().warning("Cannot configure db entry for "+dbName+" as auth service "+authName+" does not exist.");
                  return;
               }
               DBInfo dbinfo = autodbList.get(dbName);
               Storage storage = null;
               if (dbinfo==null) {
                  getLogger().info("Creating DB "+dbName);
                  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);
                  }
               } else {
                  storage = storageFactory.getStorage(dbinfo.getDB());
               }
               currentDBList.put(dbName,Boolean.TRUE);
               UserGuard adminGuard = new UserGuard(childContext,ChallengeScheme.HTTP_BASIC,"Atom Administrator",auth);
               adminGuard.getRequiredGroups().add(AuthService.ADMIN_GROUP);

               adminGuard.setNext(new AdminApplication(childContext,dbinfo.getDB(),storage,AtomApplication.RESOURCE_BASE));
               admins.put(dbName,adminGuard);
               for (Router router : adminRouters) {
                  router.attach("/admin/database/"+dbName,adminGuard).getTemplate().setMatchingMode(Template.MODE_STARTS_WITH);
               }
            }
           
            // Remove databases that have been removed from feed
            for (String name : autodbList.keySet()) {
               if (currentDBList.get(name)==null) {
                  // the database was removed
                  DBInfo dbinfo = autodbList.remove(name);
                  dbinfo.getDB().stop();
                  Storage storage = storageFactory.getStorage(dbinfo.getDB());
                  storage.stop();
                  Restlet admin = admins.remove(name);
                  if (admin!=null) {
                     for (Router router : adminRouters) {
                        router.detach(admin);
View Full Code Here

Examples of org.dayatang.datasource4saas.dscreator.DbInfo

  protected DbType instance;
  protected DbInfo dbInfo;
 

  public AbstractDbTypeTest() {
    dbInfo = new DbInfo();
    dbInfo.setHost("localhost");
    dbInfo.setPort("3306");
    dbInfo.setDbname("test_db");
    dbInfo.setInstance("XE");
    dbInfo.setUsername("root");
View Full Code Here

Examples of org.ektorp.DbInfo

                .build();
   
    CouchDbInstance dbInstance = new StdCouchDbInstance(couchClient);
    CouchDbConnector db = dbInstance.createConnector("testdb", true);
   
    DbInfo info = db.getDbInfo();
    DecimalFormat df = new DecimalFormat("#.##");

    logger.info("DB info : dbName=" + info.getDbName() + ", docCount="
        + info.getDocCount() + ", diskSize=" + df.format(info.getDiskSize()
        / 1024.0 / 1024.0) + " MB");

    Client john = new Client("John Smith", "USA");
   
    john.setId("john");
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.