Package org.xmlBlaster.contrib

Examples of org.xmlBlaster.contrib.PropertiesInfo


    * @see TestCase#setUp()
    */
   protected void setUp() throws Exception {
      super.setUp();
      this.specificHelper = new SpecificHelper(System.getProperties());
      this.info = new PropertiesInfo(specificHelper.getProperties());
      this.replPrefix = this.info.get("replication.prefix", "repl_");
      this.info.put(SpecificDefault.NEEDS_PUBLISHER_KEY, "false"); // needed to avoid publishing when reading the table
      this.pool = DbWatcher.getDbPool(this.info);
      assertNotNull("pool must be instantiated", this.pool);
      boolean forceCreationAndInit = true;
View Full Code Here


    * @see TestCase#setUp()
    */
   protected void setUp() throws Exception {
      super.setUp();
      this.specificHelper = new SpecificHelper(System.getProperties());
      this.info = new PropertiesInfo(specificHelper.getProperties());
      this.replPrefix = this.info.get("replication.prefix", "repl_");
      this.pool = DbWatcher.getDbPool(this.info);
      assertNotNull("pool must be instantiated", this.pool);
      boolean forceCreationAndInit = true;
      this.dbSpecific = ReplicationConverter.getDbSpecific(this.info, forceCreationAndInit);
View Full Code Here

      super.setUp();
     
      specificHelper = new SpecificHelper(System.getProperties());

      this.tableName = "TEST_DBSPECIFIC";
      info = new PropertiesInfo(specificHelper.getProperties());
      this.replPrefix = info.get("replication.prefix", "repl_");
      dbPool = setUpDbPool(info);
      String dbSpecificName = specificHelper.getProperties().getProperty("replication.dbSpecific.class");
      // , "org.xmlBlaster.contrib.replication.impl.SpecificOracle";" +
      dbSpecific = setUpDbSpecific(info, dbSpecificName);
View Full Code Here

     * @see TestCase#setUp()
     */
   protected void setUp() throws Exception {
      super.setUp();
      this.specificHelper = new SpecificHelper(System.getProperties());
      this.info = new PropertiesInfo(specificHelper.getProperties());
      this.dbPool = setUpDbPool(this.info);
      boolean forceCreationAndInit = true;
      this.dbSpecific = ReplicationConverter.getDbSpecific(this.info, forceCreationAndInit);
      Connection conn = null;
      try {
View Full Code Here

      }
   }
  
   public void testReadAllTables() {

      PropertiesInfo info = new PropertiesInfo(new Properties());

      info.put("table.ais.test001", "actions=IDU,trigger=ndb001tr");
      info.put("table.ais.test002", "actions=IDU,trigger=ndb002tr");
      info.put("table.ais.test003", "actions=IDU,trigger=ndb003tr");
      info.put("table.AIS.AD_ICAO_LOCATIONS", "trigger=REPL_NDB_001");
      info.put("table.AIS.AERODROME_RUNWAYS", "trigger=REPL_NDB_002");
      info.put("table.AIS.SIDS", "trigger=REPL_NDB_003");
      info.put("table.AIS.STARS", "trigger=REPL_NDB_004");
      info.put("table.AIS.NAVAIDS", "trigger=REPL_NDB_005");
      info.put("table.AIS.WAYPOINTS", "trigger=REPL_NDB_006");
      info.put("table.AIS.FIR_ICAO_LOCATIONS", "trigger=REPL_NDB_007");
      info.put("table.AIS.FIR_NEIGHBOURS", "trigger=REPL_NDB_008");
      info.put("table.AIS.FIR_ADDITIONAL_INFOS", "trigger=REPL_NDB_009");
      info.put("table.AIS.FAI_POINTS", "trigger=REPL_NDB_010");
      info.put("table.AIS.RESTRICTIVE_AIRSPACES", "trigger=REPL_NDB_011");
      info.put("table.AIS.RAREA_POINTS", "trigger=REPL_NDB_012");
      info.put("table.AIS.RAREA_FIRS", "trigger=REPL_NDB_013");
      info.put("table.AIS.RAREA_AWYWPS", "trigger=REPL_NDB_014");
      info.put("table.AIS.AIRWAYS", "trigger=REPL_NDB_015");
      info.put("table.AIS.AIRWAY_WAYPOINTS", "trigger=REPL_NDB_016");
      info.put("table.AIS.NOF_ICAO_LOCATIONS", "trigger=REPL_NDB_017");
      info.put("table.AIS.NOF_SERIES", "trigger=REPL_NDB_018");
      info.put("table.AIS.NOF_NATS", "trigger=REPL_NDB_019");
      info.put("table.AIS.NOF_FIRS", "trigger=REPL_NDB_020");
      info.put("table.AIS.SELECTION_CRITERIAS", "trigger=REPL_NDB_021");
      info.put("table.AIS.DECODE23S", "trigger=REPL_NDB_022");
      info.put("table.AIS.DECODE45S", "trigger=REPL_NDB_023");
      info.put("table.AIS.ICAO_NATIONAL_LETTERS", "trigger=REPL_NDB_024");
      info.put("table.AIS.AGENCIES", "trigger=REPL_NDB_025");
      info.put("table.AIS.AIRCRAFTS", "trigger=REPL_NDB_026");
      info.put("table.AIS.AIS_POOLS", "trigger=REPL_NDB_027");
      info.put("table.AIS.QUERY_USERS", "trigger=REPL_NDB_028");
      info.put("table.AIS.USER_PIPES", "trigger=REPL_NDB_029");
      info.put("table.AIS.DEVICE_DESCRIPTIONS", "trigger=REPL_NDB_030");
      info.put("table.AIS.DEVICE_FORMS", "trigger=REPL_NDB_031");
      info.put("table.AIS.PROCESSREGIONS", "trigger=REPL_NDB_032");
      info.put("table.AIS.AD_RESPS", "trigger=REPL_NDB_033");
      info.put("table.AIS.isLoggable(Level.FINER)_SIGNS", "trigger=REPL_NDB_034");
      info.put("table.AIS.AFOD_ADDRESSES", "trigger=REPL_NDB_035");
      info.put("table.AIS.FIR_FPL_ADDRS", "trigger=REPL_NDB_036");
      info.put("table.AIS.HOSTS", "trigger=REPL_NDB_037");
      info.put("table.AIS.TERMINAL_USERS", "trigger=REPL_NDB_038");
      info.put("table.AIS.PARAMETERS", "trigger=REPL_NDB_039");
      info.put("table.AIS.OPERATORS", "trigger=REPL_NDB_040");
      info.put("table.AIS.OP_PRIVILEGES", "trigger=REPL_NDB_041");
      info.put("table.AIS.NOTAM", "trigger=REPL_NDB_042");
      info.put("table.AIS.NCB_AIRWAYS", "trigger=REPL_NDB_043");
      info.put("table.AIS.NCB_AWYWPS", "trigger=REPL_NDB_044");
      info.put("table.AIS.NCB_COORS", "trigger=REPL_NDB_045");
      info.put("table.AIS.NCB_RAREAS", "trigger=REPL_NDB_046");
      info.put("table.AIS.NCB_RETR_KEYS", "trigger=REPL_NDB_047");
      info.put("table.AIS.NCB_TEXT_LINES", "trigger=REPL_NDB_048");
      info.put("table.AIS.NCB_RUNWAYS", "trigger=REPL_NDB_049");
      info.put("table.AIS.NOTAM_CONTROL_BLOCKS", "trigger=REPL_NDB_050");
      info.put("table.AIS.FPL", "trigger=REPL_NDB_051");
      info.put("table.AIS.FCBS", "trigger=REPL_NDB_052");
      info.put("table.AIS.FCB_AWYWPS", "trigger=REPL_NDB_054");
      info.put("table.AIS.SNOWTAM_CONTROL_BLOCKS", "trigger=REPL_NDB_056");
      info.put("table.AIS.SNOWTAM_RUNWAYS", "trigger=REPL_NDB_057");
      info.put("table.AIS.AF_LOCATION_STATUSES", "trigger=REPL_NDB_058");
      info.put("table.AIS.LR_MCBS", "trigger=REPL_NDB_059");
      info.put("table.AIS.LR_NCBS", "trigger=REPL_NDB_060");
      info.put("table.AIS.LR_SCBS", "trigger=REPL_NDB_061");
      info.put("table.AIS.LR_FCBS", "trigger=REPL_NDB_062");
      info.put("table.AIS.LR_RETRS", "trigger=REPL_NDB_063");
      info.put("table.AIS.LR_MCB_TEXTS", "trigger=REPL_NDB_064");
      info.put("table.AIS.LR_NCB_TEXTS", "trigger=REPL_NDB_065");
      info.put("table.AIS.LR_SCB_TEXTS", "trigger=REPL_NDB_066");
      info.put("table.AIS.LR_FCB_TEXTS", "trigger=REPL_NDB_067");
      info.put("table.AIS.LR_PIBS", "trigger=REPL_NDB_068");
      info.put("table.AIS.R_AD_ICAO_LOCATIONS", "trigger=REPL_NDB100");
      info.put("table.AIS.R_AD_RESPS", "trigger=REPL_NDB101");
      info.put("table.AIS.R_AERODROME_RUNWAYS", "trigger=REPL_NDB102");
      info.put("table.AIS.R_AF_LOCATION_STATUSES", "trigger=REPL_NDB103");
      info.put("table.AIS.R_AGENCIES", "trigger=REPL_NDB104");
      info.put("table.AIS.R_AIRCRAFTS", "trigger=REPL_NDB105");
      info.put("table.AIS.R_AIRWAYS", "trigger=REPL_NDB106");
      info.put("table.AIS.R_AIRWAY_WAYPOINTS", "trigger=REPL_NDB107");
      info.put("table.AIS.R_AIS_POOLS", "trigger=REPL_NDB108");
      info.put("table.AIS.R_DECODE23S", "trigger=REPL_NDB109");
      info.put("table.AIS.R_DECODE45S", "trigger=REPL_NDB110");
      info.put("table.AIS.R_DEVICE_DESCRIPTIONS", "trigger=REPL_NDB111");
      info.put("table.AIS.R_DEVICE_FORMS", "trigger=REPL_NDB112");
      info.put("table.AIS.R_FAI_POINTS", "trigger=REPL_NDB113");
      info.put("table.AIS.R_FCBS", "trigger=REPL_NDB114");
      info.put("table.AIS.R_FCB_ADDRESSS", "trigger=REPL_NDB115");
      info.put("table.AIS.R_FCB_AWYWPS", "trigger=REPL_NDB116");
      info.put("table.AIS.R_FCB_ROUTES", "trigger=REPL_NDB117");
      info.put("table.AIS.R_FCB_TEXT_LINES", "trigger=REPL_NDB118");
      info.put("table.AIS.R_FIR_ADDITIONAL_INFOS", "trigger=REPL_NDB119");
      info.put("table.AIS.R_FIR_FPL_ADDRS", "trigger=REPL_NDB120");
      info.put("table.AIS.R_FIR_ICAO_LOCATIONS", "trigger=REPL_NDB121");
      info.put("table.AIS.R_FIR_NEIGHBOURS", "trigger=REPL_NDB122");
      info.put("table.AIS.R_ICAO_NATIONAL_LETTERS", "trigger=REPL_NDB123");
      info.put("table.AIS.R_MAP_NOTAM_SYMBOLS", "trigger=REPL_NDB124");
      info.put("table.AIS.R_MAP_Q_CODE23S", "trigger=REPL_NDB125");
      info.put("table.AIS.R_NAVAIDS", "trigger=REPL_NDB126");
      info.put("table.AIS.R_NCB_AIRWAYS", "trigger=REPL_NDB127");
      info.put("table.AIS.R_NCB_AWYWPS", "trigger=REPL_NDB128");
      info.put("table.AIS.R_NCB_COORS", "trigger=REPL_NDB129");
      info.put("table.AIS.R_NCB_RAREAS", "trigger=REPL_NDB130");
      info.put("table.AIS.R_NCB_RETR_KEYS", "trigger=REPL_NDB131");
      info.put("table.AIS.R_NCB_TEXT_LINES", "trigger=REPL_NDB132");
      info.put("table.AIS.R_NCB_RUNWAYS", "trigger=REPL_NDB_150");

      info.put("table.AIS.R_NOF_FIRS", "trigger=REPL_NDB133");
      info.put("table.AIS.R_NOF_ICAO_LOCATIONS", "trigger=REPL_NDB134");
      info.put("table.AIS.R_NOF_NATS", "trigger=REPL_NDB135");
      info.put("table.AIS.R_NOF_SERIES", "trigger=REPL_NDB136");
      info.put("table.AIS.R_NOTAM_CONTROL_BLOCKS", "trigger=REPL_NDB137");
      info.put("table.AIS.R_PROCESSREGIONS", "trigger=REPL_NDB138");
      info.put("table.AIS.R_QUERY_USERS", "trigger=REPL_NDB139");
      info.put("table.AIS.R_RAREA_FIRS", "trigger=REPL_NDB140");
      info.put("table.AIS.R_RAREA_POINTS", "trigger=REPL_NDB141");
      info.put("table.AIS.R_RESTRICTIVE_AIRSPACES", "trigger=REPL_NDB142");
      info.put("table.AIS.R_SELECTION_CRITERIAS", "trigger=REPL_NDB143");
      info.put("table.AIS.R_SIDS", "trigger=REPL_NDB144");
      info.put("table.AIS.R_SNOWTAM_CONTROL_BLOCKS", "trigger=REPL_NDB145");
      info.put("table.AIS.R_SNOWTAM_RUNWAYS", "trigger=REPL_NDB146");
      info.put("table.AIS.R_STARS", "trigger=REPL_NDB147");
      info.put("table.AIS.R_USER_PIPES", "trigger=REPL_NDB148");
      info.put("table.AIS.R_WAYPOINTS", "trigger=REPL_NDB149");

      Connection conn = null;
      try {
         conn = this.dbPool.reserve();
         conn.setAutoCommit(true);
View Full Code Here

      if (!masterFilename.equalsIgnoreCase("default")) {
         InputStream is = getFileFromClasspath(masterFilename);
         props.load(is);
         is.close();
      }
      I_Info readerInfo = new OwnGlobalInfo(cfgInfo, new PropertiesInfo(props), "reader", null);
      Map defaultMap = getReaderDefaultMap(readerInfo);
     
      String[] keys = (String[])defaultMap.keySet().toArray(new String[defaultMap.size()]);
      for (int i=0; i < keys.length; i++) {
         if (readerInfo.get(keys[i], null) == null)
View Full Code Here

      }
     
      I_InitialUpdateListener listener = null;
      if (stopWatcherOnIU)
         listener = this;
      I_Info writerInfo = new OwnGlobalInfo(cfgInfo, new PropertiesInfo(props), "writer", listener);
     
      Map defaultMap = getWriterDefaultMap(writerInfo);
      String[] keys = (String[])defaultMap.keySet().toArray(new String[defaultMap.size()]);
      for (int i=0; i < keys.length; i++) {
         if (writerInfo.get(keys[i], null) == null)
View Full Code Here

   public static TableToWatchInfo[] getTablesToWatch(Connection conn, I_Info originalInfo) throws Exception {
      synchronized (originalInfo) {
         Iterator iter = originalInfo.getKeys().iterator();

         // prepare defaults defined with a '*' token
         I_Info ownInfo = new PropertiesInfo(new Properties());
         while (iter.hasNext()) {
            String key = ((String)iter.next()).trim();
            if (!key.startsWith(TABLE_PREFIX_WITH_SEP))
               continue;
            String val = originalInfo.get(key, null);
            if (key.indexOf(ALL_TOKEN) < 0L) {
               ownInfo.put(key, val);
               continue;
            }
            TableToWatchInfo tableToWatch = new TableToWatchInfo();
            tableToWatch.assignFromInfoPair(key, val);
            String[] tableNames = getTablesForSchema(TABLE_PREFIX_WITH_SEP, conn, tableToWatch);
            for (int i=0; i < tableNames.length; i++)
               ownInfo.put(tableNames[i], "");
         }

         TreeMap map = new TreeMap();
         int count = 0;
         iter = ownInfo.getKeys().iterator();
         while (iter.hasNext()) {
            String key = ((String)iter.next()).trim();
            if (!key.startsWith(TABLE_PREFIX_WITH_SEP))
               continue;
            count++;
            String val = ownInfo.get(key, null);
            TableToWatchInfo tableToWatch = new TableToWatchInfo();
            tableToWatch.assignFromInfoPair(key, val);
            Long mapKey = new Long(tableToWatch.getReplKey());
            ArrayList list = (ArrayList)map.get(mapKey);
            if (list == null) {
View Full Code Here

      if (maxRows > 0L) {
         if (maxRows > Integer.MAX_VALUE)
            throw new Exception("Too many maxRows: '" + maxRows + "' but should be maximum '" + Integer.MAX_VALUE + "'");
         props.put("converter.maxRows", "" + maxRows);
      }
      ResultSetToXmlConverter converter = new ResultSetToXmlConverter(new PropertiesInfo(props));
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      converter.setOutputStream(baos, command, ident, null);
      while (rs.next())
         converter.addInfo(conn, rs, ResultSetToXmlConverter.ROW_ONLY);
      converter.done();
View Full Code Here

   public static I_DbPool getDbInfoPool(I_Info info) throws Exception {
      I_Info infoForDbInfo = (I_Info)info.getObject("infoForDbInfo");
      if (infoForDbInfo == null) {
         Map dbInfoMap = InfoHelper.getPropertiesStartingWith("dbinfo.", info, null, "db.");
         if (dbInfoMap.containsKey("db.url")) {
            infoForDbInfo = new PropertiesInfo(new Properties());
            InfoHelper.fillInfoWithEntriesFromMap(infoForDbInfo, dbInfoMap);
            info.putObject("infoForDbInfo", infoForDbInfo);
         }
      }
      if (infoForDbInfo != 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.