Package org.xmlBlaster.contrib

Examples of org.xmlBlaster.contrib.PropertiesInfo


         System.err.println("Usage: java " + SqlInfoParser.class.getName() + " inputFilename");
         System.exit(-1);
      }
     
      try {
         I_Info info = new PropertiesInfo(System.getProperties());
         SqlInfoParser parser = new SqlInfoParser();
         parser.init(info);
         SqlInfo sqlInfo = parser.readObject(new FileInputStream(args[0]), null);
         System.out.println("Number of rows: " + sqlInfo.getRowCount());
      }
View Full Code Here


         }
         if (System.getProperty("db.password", null) == null) {
            System.setProperty("db.password", "");
         }

         I_Info info = new PropertiesInfo(System.getProperties());
         boolean forceCreationAndInit = true;
         I_DbSpecific specific = ReplicationConverter.getDbSpecific(info, forceCreationAndInit);
         pool = (I_DbPool) info.getObject("db.pool");
         conn = pool.reserve();
         conn.setAutoCommit(true);
         String schema = info.get("wipeout.schema", null);
         String version = info.get("replication.version", "0.0");
         if (schema == null) {
            String initialUpdateFile = info.get("initialUpdate.file", null);
            if (initialUpdateFile != null) {
               specific.initialCommand(null, initialUpdateFile, version);
            }
            else
               specific.cleanup(conn, true);
View Full Code Here

         else {
            System.err.println("Using properties file '" + propFile + "'");
            props = new Properties(System.getProperties());
            props.load(new FileInputStream(propFile));
         }
         I_Info info = new PropertiesInfo(props);
        
         if (args.length < 2) {
            System.err.println("Usage: " + SqlDescription.class.getName() + " oldFile.xml newFile.xml");
            System.exit(-1);
         }
View Full Code Here

         }
         if (System.getProperty("db.password", null) == null) {
            System.setProperty("db.password", "xbl");
         }
         SpecificOracle oracle = new SpecificOracle();
         I_Info info = new PropertiesInfo(System.getProperties());
         oracle.init(info);
         I_DbPool pool = (I_DbPool) info.getObject("db.pool");
         Connection conn = pool.reserve();
         String objectTypes = info.get("objectTypes", null);
         String schema = info.get("schema", "AIS");
         String referencedSchema = info.get("referencedSchema", null);
         oracle.cleanupSchema(schema, objectTypes, referencedSchema);
         conn = SpecificDefault.releaseIntoPool(conn, COMMIT_NO, pool);
      }
      catch (Throwable e) {
         System.err.println("SEVERE: " + e.toString());
View Full Code Here

   public static DbWriter createSingleDbWriter(I_Info masterInfo, String loginName, String password) throws Exception {
      if (loginName == null || loginName.length() < 0) {
         log.warning("The configuration contains no 'mom.loginName' property, will only use one instance of DbWriter based on other configuration parameters");
         return new DbWriter(masterInfo);
      }
      I_Info instanceInfo = new PropertiesInfo(new Properties()); // could be another implementation too
      InfoHelper.fillInfoWithEntriesFromInfo(instanceInfo, masterInfo);
      instanceInfo.put("mom.loginName", loginName);
      instanceInfo.put("mom.password", password);
      log.fine("instancing a DbWriter for mom.loginName '" + loginName + "' with password='" + password + "'");
      return new DbWriter(instanceInfo);
   }
View Full Code Here

         else {
            System.err.println("Using properties file '" + propFile + "'");
            props = new Properties(System.getProperties());
            props.load(new FileInputStream(propFile));
         }
         I_Info info = new PropertiesInfo(props);
        
         boolean forceCreationAndInit = true;
         ReplicationConverter.getDbSpecific(info, forceCreationAndInit);
        
         SqlInfo sqlInfo = SqlInfo.getStructure(info);
View Full Code Here

      return "UNKNOWN";
   }

  
   public static SqlColumn getComplete() {
      SqlColumn desc = new SqlColumn(new PropertiesInfo(new Properties()));
      desc.setColName("someName");
      desc.setTable("tableName");
      desc.setSchema("schemaName");
      desc.setCatalog("catalogName");
      desc.setType("typeName");
View Full Code Here

   }

   public void testRemoveEntry() {
      I_Info[] infos = {
                         new Info("id"),
                         new PropertiesInfo(new Properties()),
                         new ClientPropertiesInfo(new HashMap()),
                         /* new DbInfo(new HashMap()), */
                         new OwnGlobalInfo()
                       };
      String[] names = new String[] {"Info", "PropertiesInfo", "ClientPropertiesInfo", /*.*/ "GlobalInfo"};
View Full Code Here

   }
  
   public static void main(String[] args) {
      try {
         I_DbPool pool = new DbPool();
         I_Info info = new PropertiesInfo(System.getProperties());
         String filename = info.get("file", null);
         if (filename == null) {
            System.out.println("usage: java -Dfile=someFile org.xmlBlaster.contrib.db.DbPool");
            System.exit(-1);
         }
           
View Full Code Here

            String dbInstanceName = glob.getStrippedId();
            dbUrl = ReplaceVariable.replaceFirst(dbUrl, "$_{xmlBlaster_uniqueId}", dbInstanceName);
           
         }
         Properties props = new Properties();
         PropertiesInfo tmpInfo = new PropertiesInfo(props);
         InfoHelper.fillInfoWithEntriesFromInfo(tmpInfo, info);
         this.connectionPool = new JdbcConnectionPool();
         this.connectionPool.initialize(glob, props);
         this.initCount++;
         String createInterceptorClass = info.get("db.createInterceptor.class", null);
View Full Code Here

TOP

Related Classes of org.xmlBlaster.contrib.PropertiesInfo

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.