Package org.xmlBlaster.contrib.dbwatcher

Examples of org.xmlBlaster.contrib.dbwatcher.Info


    * @throws Exception Can be of any type
    */
   private void pollingExample(Preferences prefs) throws Exception {
      log.info("Start polling test");
     
      I_Info info = new Info(prefs);
      DbWriter processor = new DbWriter(info);
     
      long sleep = info.getLong("example.sleep", 0L);
      if (sleep > 0) {
         log.info("Sleeping for '" + sleep / 1000 + " seconds");
         Thread.sleep(sleep);
      }
      else {
View Full Code Here


         LogManager.getLogManager().readConfiguration();

         Preferences prefs = loadArgs(args);
         if (prefs == null)
            return;
         Info info = new Info(prefs);
         StressGenerator example = new StressGenerator(info);
         example.run();
     
      }
      catch (Throwable e) {
View Full Code Here

    * @throws Exception Can be of any type
    */
   private void pollingExample(Preferences prefs) throws Exception {
      log.info("Start polling test");
     
      I_Info info = new Info(prefs);
      DbWatcher processor = new DbWatcher(info);
      processor.startAlertProducers();

      boolean interactive = info.getBoolean("interactive", true);
      if (interactive) {
         // Manually trigger db checking ...
         BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
         while (true) {
            System.out.print("Hit 'q' to exit, 't' to trigger an event > ");
View Full Code Here

         LogManager.getLogManager().readConfiguration();

         Preferences prefs = loadArgs(args);
         if (prefs == null)
            return;
         Info info = new Info(prefs);
         DbWatcherTester example = new DbWatcherTester(info);
         example.run();
     
      }
      catch (Throwable e) {
View Full Code Here

      super.tearDown();
   }

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

     * Default ctor.
     */
    public TestInfoObjects() {
       super();
       Preferences prefs = Preferences.userRoot();
       this.info = new Info(prefs);
       XMLUnit.setIgnoreWhitespace(true);
    }
View Full Code Here

     * Default ctor.
     */
    public TestRecordParsing() {
       super();
       Preferences prefs = Preferences.userRoot();
       this.info = new Info(prefs);
       XMLUnit.setIgnoreWhitespace(true);
    }
View Full Code Here

     */
   protected void setUp() throws Exception {
      super.setUp();
      this.prefs = Preferences.userRoot();
      this.prefs.clear();
      this.info = new Info(this.prefs);
      this.dbPool = org.xmlBlaster.test.contrib.dbwatcher.TestResultSetToXmlConverter.setUpDbPool(info);
      this.processor = null;
      try {
         this.dbPool.update("DROP TABLE TEST_TS");
      } catch(Exception e) {
View Full Code Here

      this.prefs.put("converter.rootName", "myRootTag");
      this.prefs.put("converter.addMeta", ""+true);
      this.prefs.put("db.queryMeatStatement", "SELECT * FROM TEST_TS WHERE TO_CHAR(ts, 'YYYY-MM-DD HH24:MI:SSXFF') > '${oldTimestamp}' ORDER BY ICAO_ID");
      this.prefs.put("mom.topicName", "db.change.event.${groupColValue}");
     
      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("converter.rootName", "myRootTag");
      this.prefs.put("converter.addMeta", ""+true);
      this.prefs.put("db.queryMeatStatement", "SELECT * FROM TEST_TS WHERE TO_CHAR(ts, 'YYYY-MM-DD HH24:MI:SSXFF') > '${oldTimestamp}' ORDER BY ICAO_ID");
      this.prefs.put("mom.topicName", "db.change.event.${groupColValue}");
     
      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

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.