Package org.xmlBlaster.contrib.dbwatcher

Examples of org.xmlBlaster.contrib.dbwatcher.Info


     */
   protected void setUp() throws Exception {
      super.setUp();
      this.prefs = Preferences.userRoot();
      this.prefs.clear();
      this.info = new Info(this.prefs);
     
      this.dbPool = setUpDbPool(info);
      try {
         this.dbPool.update("DROP TABLE TEST_POLL");
      } catch(Exception e) {
View Full Code Here


      this.prefs.put("changeDetector.groupColName", ""); // !!! Tests without grouping
      this.prefs.put("converter.addMeta", ""+true);
      this.prefs.put("changeDetector.detectStatement", "SELECT colKey, col1, col2, ICAO_ID FROM TEST_POLL");
      this.prefs.put("mom.topicName", "db.change.event.TEST_POLL");
     
      this.processor = createTest(new Info(prefs), this.updateMap);
      I_ChangeDetector changeDetector = processor.getChangeDetector();
     
      for (int i=0; i<2; i++) {
         log.info("Testing no table ...");
         changeDetector.checkAgain(null);
View Full Code Here

      this.dbPool.update("CREATE TABLE TEST_POLL (colKey NUMBER(10,3), col1 VARCHAR(20), col2 NUMBER(12), ICAO_ID VARCHAR(10))");
      //this.dbPool.update("INSERT INTO TEST_POLL (colKey, col1, col2) VALUES ('2.0', 'XXX', '2000')");
      this.dbPool.update("INSERT INTO TEST_POLL (colKey) VALUES ('2.0')");
     
      this.processor = createTest(new Info(prefs), this.updateMap);
      I_ChangeDetector changeDetector = processor.getChangeDetector();
     
      changeDetector.checkAgain(null);
      sleep(500);
      assertEquals("Number of message is wrong", 1, this.updateMap.size());
View Full Code Here

      this.prefs.put("changeDetector.groupColName", ""); // !!! Tests without grouping
      this.prefs.put("converter.addMeta", ""+true);
      this.prefs.put("changeDetector.detectStatement", "SELECT colKey, col1, col2, ICAO_ID FROM TEST_POLL");
      this.prefs.put("mom.topicName", "db.change.event.TEST_POLL");
     
      this.processor = createTest(new Info(prefs), this.updateMap);
      I_ChangeDetector changeDetector = processor.getChangeDetector();
     
      for (int i=0; i<2; i++) {
         log.info("Testing no table ...");
         changeDetector.checkAgain(null);
View Full Code Here

         else {       
            if (this.processor != null) this.processor.shutdown();
            this.prefs.put("converter.class", "org.xmlBlaster.contrib.dbwatcher.convert.ResultSetToXmlConverter");
            hasConverter = true;
         }
         this.processor = createTest(new Info(prefs), this.updateMap);
         I_ChangeDetector changeDetector = processor.getChangeDetector();

         for (int i=0; i<2; i++) {
            log.info("Testing no table ...");
            changeDetector.checkAgain(null);
View Full Code Here

         else {       
            this.processor.shutdown();
            this.prefs.put("converter.class", "org.xmlBlaster.contrib.dbwatcher.convert.ResultSetToXmlConverter");
            hasConverter = true;
         }
         this.processor = createTest(new Info(prefs), this.updateMap);
         I_ChangeDetector changeDetector = processor.getChangeDetector();

         for (int i=0; i<2; i++) {
            log.info("Testing no table ...");
            changeDetector.checkAgain(null);
View Full Code Here

      this.prefs.put("alertScheduler.pollInterval", "500");
      this.prefs.put("changeDetector.groupColName", "ICAO_ID");
      this.prefs.put("changeDetector.detectStatement", "SELECT col1, col2, ICAO_ID FROM TEST_POLL ORDER BY ICAO_ID");
      this.prefs.put("mom.topicName", "db.change.event.${groupColValue}");
     
      this.processor = createTest(new Info(prefs), this.updateMap);

      {
      log.info("Testing startup events ...");
      try { Thread.sleep(1500); } catch(Exception e) { /* Ignore */ }
      assertEquals("Number of message is wrong", 3, this.updateMap.size());
View Full Code Here

      this.prefs.put("changeDetector.groupColName", "ICAO_ID");
      this.prefs.put("changeDetector.detectStatement", "SELECT col1, col2, ICAO_ID FROM TEST_POLL ORDER BY ICAO_ID");
      this.prefs.put("mom.topicName", "db.change.event.${groupColValue}");
      this.prefs.put("converter.class", ""); // No change detector class !
     
      this.processor = createTest(new Info(prefs), this.updateMap);

      {
      log.info("Testing startup events ...");
      try { Thread.sleep(1500); } catch(Exception e) { /* Ignore */ }
      assertEquals("Number of message is wrong", 3, this.updateMap.size());
View Full Code Here

TOP

Related Classes of org.xmlBlaster.contrib.dbwatcher.Info

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.