Package org.xmlBlaster.util

Examples of org.xmlBlaster.util.Global


   private Properties props;
  
   public BlasterManagedConnectionFactory() throws ResourceException{
      props = new Properties();
      // We use the global to get an Id and then we throw it away
      glob = new Global(new String[]{},false,false);
      this.myName = this.myName + "[" + glob.getId() + "]";
   }
View Full Code Here


    * <p>This Global will be setup to be used in a server environment.</p>
    * <p>if an engine global exists, the properties from that one will be
    * set first in the created Global.</p>
    */
   public Global newGlobal(String propertyFileName, Properties args) throws IllegalStateException {
      Global glob = new Global(new String[]{},false,false);
      Global clone = getClone(glob);
      addEngineProperties(clone);
      addServerProperties(clone);
      loadPropertyFile(clone,propertyFileName);
      addArguments(clone,args);
      return clone;
View Full Code Here

   /**
    * Clone the given Global, check if it contains a ServerNode, or set
    * this engineGlobal if not null as ServerNode.
    */
   public Global getClone(Global global) {
      Global g = global.getClone(null);
     
      Object engine = global.getObjectEntry(Constants.OBJECT_ENTRY_ServerScope);
      Object eg = engine != null ? engine : engineGlobal;
      if ( eg != null) {
         g.addObjectEntry(Constants.OBJECT_ENTRY_ServerScope, eg);
      } // end of if ()
     
      // Should we perhaps also clone POA???

      return g;
View Full Code Here

      if (this.initCount > 0) {
         this.initCount++;
         return;
      }
     
      Global globOrig = (Global)info.getObject("org.xmlBlaster.engine.Global");
      if (globOrig == null) {
         globOrig = (Global)info.getObject("org.xmlBlaster.util.Global");
         if (globOrig == null)
            this.glob = new Global();
         else
            this.glob = globOrig;
      }
      else {
         if (globOrig instanceof org.xmlBlaster.engine.ServerScope) {
            this.glob = globOrig.getClone(globOrig.getNativeConnectArgs());
            this.glob.addObjectEntry(Constants.OBJECT_ENTRY_ServerScope, globOrig.getObjectEntry(Constants.OBJECT_ENTRY_ServerScope)); //"ServerNodeScope"
         }
         else {
            this.glob = globOrig;
         }
      }
View Full Code Here

      System.exit(-1);
   }
  
   public static void main(String[] args) {
      try {
         Global global = new Global(args);
         I_XmlBlasterAccess conn = global.getXmlBlasterAccess();
         ConnectQos connectQos = new ConnectQos(global);
         conn.connect(connectQos, new ReplManagerPlugin()); // just a fake
        
         String cmd = global.getProperty().get("cmd", (String)null);
         if (cmd == null)
            mainUsage();
        
         String requestId = global.getProperty().get("requestId", (String)null);
         if (requestId == null)
            mainUsage();
        
         int count = Integer.parseInt(requestId.trim());
        
         String repl = global.getProperty().get(REPL_PREFIX_KEY, REPL_PREFIX_DEFAULT);
         if (repl == null)
            mainUsage();
        
         PublishKey pubKey = new PublishKey(global, "broadcastChecker");
View Full Code Here

    *   java HelloWorld9 -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 HelloWorld9 -session.name Jeff\n");
         System.exit(1);
      }

      new HelloWorld9(glob);
View Full Code Here

    *   java HelloWorld3 -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 HelloWorld3 -session.name Jeff\n");
         System.exit(1);
      }

      new HelloWorld3(glob);
View Full Code Here

            log.info("Sender connected to xmlBlaster " + conRetQos.getSessionName().getRelativeName());
         }


         {  // setup the receiver client which processes the request (usually another process) ...
            Global globReceiver = glob.getClone(null);
            receiver = globReceiver.getXmlBlasterAccess();

            ConnectQos qos = new ConnectQos(receiver.getGlobal(), receiverName, "secret");
            ConnectReturnQos conRetQos = receiver.connect(qos, new I_Callback() {
               public String update(String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos) {
                  log.info(receiverName+": Receiving asynchronous message '" + updateKey.getOid() + "' in receiver default handler");
View Full Code Here

    *   java HelloWorld8 -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 HelloWorld8\n");
         System.exit(1);
      }

      new HelloWorld8(glob);
View Full Code Here

   private long initialSleep;
   private Global global;
  
   public MultiThreadSequencer(boolean isPublish, long initialSleep, String[] args) {
      super();
      this.global = new Global();
      this.global.init(args);
      this.initialSleep = initialSleep;
      this.isPublish = isPublish;
   }
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.