Package org.xmlBlaster.util

Examples of org.xmlBlaster.util.Global


    *   java HelloWorld2 -help
    * </pre>
    * for usage help
    */
   public static void main(String args[]) {
      Global glob = new Global();

      if (glob.init(args) != 0) { // Get help with -help
         System.out.println(glob.usage());
         System.out.println("Example: java HelloWorld2 -session.name Jack");
         System.exit(1);
      }

      new HelloWorld2(glob);
View Full Code Here


    *   java HelloWorld7 -help
    * </pre>
    * for usage help
    */
   public static void main(String args[]) {
      Global glob = new Global();
     
      if (glob.init(args) != 0) { // Get help with -help
         System.out.println(glob.usage());
         System.err.println("Example: java HelloWorld7 -session.name Jeff\n");
         System.exit(1);
      }

      new HelloWorld7(glob);
View Full Code Here

    *   java javaclients.HelloWorldGet -help
    * </pre>
    * for usage help
    */
   public static void main(String args[]) {
      Global glob = new Global();
     
      if (glob.init(args) != 0) { // Get help with -help
         System.out.println(glob.usage());
         System.err.println("\nExample:");
         System.err.println("  java javaclients.HelloWorldGet -oid Hello -initialUpdate true\n");
         System.err.println("  java javaclients.HelloWorldGet  -clientProperty[myString] Hello -clientProperty[correlationId] 100\n");
         System.exit(1);
      }
View Full Code Here

      this.namingService.stop();
   }

   public void prepare(String[] args) {
      //this.args = args;
      this.glob = new Global(args);
   }
View Full Code Here

         doTestRemoveEntry(names[i], infos[i]);
   }

   public void testReplaceKey() {
      try {
         Global global = new Global();

         global.getProperty().set("test1", "key1");
         global.getProperty().set("test2", "key2");
         global.getProperty().set("test3", "key3");
        
         global.getProperty().set("test.one.two.${test0}", "test0");
         global.getProperty().set("test.one.two.${test1}", "test1");
         global.getProperty().set("test.one.two.${test2}", "test2");
         global.getProperty().set("test.one.two.${test3}", "test3");

         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);
        
        
      }
      catch (XmlBlasterException ex) {
View Full Code Here

    */
   public static Test suite() throws Exception
   {
     
      TestSuite suite= new TestSuite();
      suite.addTest(new TestThreadLeak(new Global(),
"testThreadLeakage"));
      return suite;
   }
View Full Code Here

    * <pre>
    */
   public static void main(String args[]) throws Exception
   {
      try {
         Global glob = new Global();
         if (glob.init(args) != 0) {
            System.err.println(ME + ": Init failed");
            System.exit(1);
         }
         TestThreadLeak testSub = new TestThreadLeak(glob, "testThreadLeak");
         testSub.setUp();
View Full Code Here

    * <pre>
    *   java org.xmlBlaster.test.memoryleak.Embedded -interactive true
    * <pre>
    */
   public static void main(String args[]) {
      Embedded embedded = new Embedded(new Global(args));
      embedded.testLoop();
   }
View Full Code Here

    *   java javaclients.HelloWorldPublish -help
    * </pre>
    * for usage help
    */
   public static void main(String args[]) {
      Global glob = new Global();

      if (glob.init(args) != 0) { // Get help with -help
         System.out.println(glob.usage());
         System.err.println("\nExample:");
         System.err.println("  java javaclients.HelloWorldPublish -interactive false -sleep 1000 -numPublish 10 -oid Hello -persistent true -erase true\n");
         System.err.println("  java javaclients.HelloWorldPublish  -clientProperty[myString] Hello -clientProperty[correlationId] 100\n");
         System.exit(1);
      }
View Full Code Here

    *   java org.xmlBlaster.test.memoryleak.PublishErase -bulkSize 200
    * </pre>
    * for usage help
    */
   public static void main(String args[]) {
      Global glob = new Global();
     
      if (glob.init(args) != 0) { // Get help with -help
         System.out.println(glob.usage());
         System.err.println("Example: java PublishErase -loginName Jeff\n");
         System.exit(1);
      }

      new PublishErase(glob);
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.Global

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.