Package org.xmlBlaster.contrib

Examples of org.xmlBlaster.contrib.GlobalInfo


  
  
   public GlobalInfo prepare(String[] args) throws Exception {
      cmdLineArgs = args;
      Global global = new Global(cmdLineArgs);
      GlobalInfo cfgInfo = createOwnGlobalInfo(global, null, "configuration");
      stopWatcherOnIU = fillInfoWithCommandLine(cmdLineArgs, cfgInfo);
      return cfgInfo;
   }
View Full Code Here


      try {
         // I_Info cfgInfo = new PropertiesInfo(new Properties());
        
         ReplicationAgent agent = new ReplicationAgent();

         GlobalInfo cfgInfo = agent.prepare(args);
         I_Info readerInfo = agent.createReaderInfo(cfgInfo);
         I_Info writerInfo = agent.createWriterInfo(agent.prepare(args));
        
         if (ReplicationAgent.needsHelp(args)) {
            agent.displayHelp(readerInfo, writerInfo);
            System.exit(-1);
         }

         boolean isInteractive = cfgInfo.getBoolean("interactive", false);
         agent.init(readerInfo, writerInfo);

         log.info("REPLICATION AGENT IS NOW READY");
         if (isInteractive)
            agent.process(readerInfo, writerInfo);
View Full Code Here

         shutdownDbWatcher();
   }
  
   public void stopInitialUpdate() throws Exception {
      if (hasDbWatcher) {
         GlobalInfo cfgInfo = prepare(cmdLineArgs);
         I_Info readerInfo = createReaderInfo(cfgInfo);
         startDbWatcher(readerInfo);
         log.info("The DbWatcher has been successfully restarted");
      }
   }
View Full Code Here

         global.getProperty().set("${test.replace.key}", "testReplaceKey");
         global.getProperty().set("${test.replace.key1}", "testReplaceKey1");
         global.getProperty().set("someKey3", "testReplaceKey1");
         global.getProperty().set("${test.replace.key}", "testReplaceKey");
         global.getProperty().set("test.replace.key", "someKey");
         GlobalInfo info = new OwnGlobalInfo();
         info.init(global, null);
         String val = info.get("someKey", null);
         assertNotNull("The value must be set", val);
         assertEquals("wrong value of replaced key", "testReplaceKey", val);

         val = info.get("${test.replace.key1}", null);
         assertNotNull("The value must be set", val);
        
         val = global.getProperty().get("someKey3", (String)null);
         assertNotNull("The value must be set", val);

        
         Properties props = new Properties();
         props.put("one", "one");
         val = props.getProperty("one");
         assertNotNull("The value must be set", val);

         props.remove("one");
         val = props.getProperty("one");
         assertNull("The value must NOT be set", val);
        
        
         global.getProperty().removeProperty("someKey3");
         val = global.getProperty().get("someKey3", (String)null);
         assertNull("The value must NOT be set", val);
        
         val = info.get("${test.replace.key}", null);
         assertNotNull("The value must be set", val);
        
         val = global.getProperty().get("someKey3", (String)null);
         assertNull("The value must NOT be set", val);
        
View Full Code Here

TOP

Related Classes of org.xmlBlaster.contrib.GlobalInfo

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.