Esempio n. 1
0
  public static void main(String[] args) {
    java.util.Properties props = new Properties();
    props.putAll(System.getProperties());
    props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
    props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");

    int status = 0;
    ORB orb = null;

    try {
      orb = ORB.init(args, props);
      status = run(orb, false, args);
    } catch (Exception ex) {
      ex.printStackTrace();
      status = 1;
    }

    if (orb != null) {
      try {
        orb.destroy();
      } catch (Exception ex) {
        ex.printStackTrace();
        status = 1;
      }
    }

    System.exit(status);
  }
Esempio n. 2
0
 public static void main(String[] args) {
   ORB orb = null;
   orb = ORB.init(args, null);
   if (orb != null) {
     try {
       new ClientGui(orb);
     } catch (Exception e) {
       System.err.println(e);
       System.exit(-1);
     }
   } else {
     System.err.println("can't initiate orb");
     System.exit(-1);
   }
 } /*end of main*/
Esempio n. 3
0
  public static void main(String[] args) {
    java.util.Properties props = new Properties();
    props.putAll(System.getProperties());
    props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
    props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");

    int status = 0;
    ORB orb = null;

    try {
      Client.ClientRegisterInterceptors(props, true);
      Server.ServerRegisterInterceptors(props);

      props.put("yoko.orb.id", "myORB");
      orb = ORB.init(args, props);
      status = Server.ServerRun(orb, true, args);

      if (status == 0) {
        status = Client.ClientRun(orb, true, args);

        //
        // The ORB must be totally shutdown before the servants
        // are deleted.
        //
        orb.shutdown(true);

        Server.ServerCleanup();
      }
    } catch (Exception ex) {
      ex.printStackTrace();
      status = 1;
    }

    if (orb != null) {
      try {
        orb.destroy();
      } catch (Exception ex) {
        ex.printStackTrace();
        status = 1;
      }
    }

    System.exit(status);
  }
  /**
   * Returns the CORBA Object which represents this object.
   *
   * @param
   * @return The CORBA object.
   * @see
   */
  final synchronized RecoveryCoordinator object() {

    if (thisRef == null) {
      if (poa == null) {
        poa = Configuration.getPOA("RecoveryCoordinator" /*#Frozen*/);
        recoverable = Configuration.isRecoverable();
      }

      try {

        if (recoverable && globalTID != null) {
          // Create the object id from the global transaction
          // identifier and the internal sequence number.

          byte[] tidBytes = globalTID.toBytes();
          byte[] id = new byte[tidBytes.length + 4];
          System.arraycopy(tidBytes, 0, id, 4, tidBytes.length);
          id[0] = (byte) internalSeq;
          id[1] = (byte) (internalSeq >> 8);
          id[2] = (byte) (internalSeq >> 16);
          id[3] = (byte) (internalSeq >> 24);

          // Activate the object and create the reference.

          poa.activate_object_with_id(id, this);

          org.omg.CORBA.Object obj =
              poa.create_reference_with_id(id, RecoveryCoordinatorHelper.id());
          thisRef = RecoveryCoordinatorHelper.narrow(obj);
          // thisRef = (RecoveryCoordinator) this;
        } else {
          poa.activate_object(this);
          org.omg.CORBA.Object obj = poa.servant_to_reference(this);
          thisRef = RecoveryCoordinatorHelper.narrow(obj);
          // thisRef = (RecoveryCoordinator)this;
        }
      } catch (Exception exc) {
        _logger.log(Level.SEVERE, "jts.create_recoverycoordinator_error");
        String msg =
            LogFormatter.getLocalizedMessage(_logger, "jts.create_recoverycoordinator_error");
        throw new org.omg.CORBA.INTERNAL(msg);
      }
    }

    return thisRef;
  }
  /**
   * Creates the RecoveryCoordinatorImpl with the given key.
   *
   * <p>This is done when the RecoveryCoordinator object is recreated after the server has been
   * restarted.
   *
   * <p>The first four bytes of the key are an internal sequence number used to differentiate
   * RecoveryCoordinator objects created in the same process for the same transaction.
   *
   * <p>The rest of the key is the global transaction identifier.
   *
   * @param key The key for the object.
   * @return
   * @see
   */
  RecoveryCoordinatorImpl(byte[] key) {

    // Get the global transaction identifier from the key.

    byte[] tidBytes = new byte[key.length - 4];

    // BUGFIX (Ram Jeyaraman) changed the order of array copy.
    // previously, an source and destination array was wrong.
    // System.arraycopy(tidBytes, 0, key, 4, tidBytes.length);
    System.arraycopy(key, 4, tidBytes, 0, tidBytes.length);

    globalTID = new GlobalTID(tidBytes);

    // Ensure that recovery has completed so that
    // we can get the Coordinator.

    RecoveryManager.waitForRecovery();

    // Leave other members at the default values.
  }
Esempio n. 6
0
  public static void main(String[] args) {
    loggedUser = args[0];
    try {
      ORB orb = ORB.init(args, null); // initialize ORB
      o = orb.resolve_initial_references("NameService");

      // get reference to Deal object
      NamingContext ncRef = NamingContextHelper.narrow(o);
      NameComponent[] nc = new NameComponent[1];
      nc[0] = new NameComponent();
      nc[0].id = "Auction";
      nc[0].kind = "";
      a = AuctionHelper.narrow(ncRef.resolve(nc));

      isr = new InputStreamReader(System.in);
      in = new BufferedReader(isr);
      int sel = 0;
      System.out.println("******* You have logged in Successfully! ********");
      while (sel == 0) {
        System.out.println("Please make a selection");
        System.out.println("\t1. Get all the listed auctions");
        System.out.println("\t2. List a new item for auction.");
        System.out.println("\t3. Lookup an auction.");
        System.out.println("\t4. Place a bid on an auction.");
        System.out.println("\t5. Logout.");
        System.out.print("Please make your selection > ");
        String f = in.readLine();
        try {
          sel = Integer.parseInt(f);
        } catch (Exception e) {
          sel = 42;
        }
        switch (sel) {
          case 1:
            allItems();
            sel = 0;
            break;
          case 2:
            newAuction();
            sel = 0;
            break;
          case 3:
            System.out.println("Stub");
            sel = 0;
            break;
          case 4:
            placeBid();
            sel = 0;
            break;
          case 5:
            a.logout(loggedUser);
            System.out.println("BYE!");
            System.exit(0);
          default:
            System.out.println("You have not made a valid selection, please try again.");
            sel = 0;
            break;
        }
      }
    } catch (Exception e) {
      System.out.println("ERROR : " + e);
      e.printStackTrace(System.out);
    }
  }
  public void receive_request(ServerRequestInfo ri) {
    try {
      //
      // Test: get operation name
      //
      String op = ri.operation();

      boolean oneway = (op.equals("noargs_oneway"));

      //
      // Test: Examine arguments
      //
      testArgs(ri, false);

      // TODO: test operation_context

      //
      // Test: result is not available
      //
      try {
        Any result = ri.result();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: exceptions
      //
      try {
        TypeCode[] exceptions = ri.exceptions();
        if (op.equals("userexception")) {
          TEST(exceptions.length == 1);
          TEST(exceptions[0].equal(userHelper.type()));
        } else {
          TEST(exceptions.length == 0);
        }
      } catch (NO_RESOURCES ex) {
        // Expected (if servant is DSI)
      }

      //
      // Test: response expected and oneway should be equivalent
      //
      TEST((oneway && !ri.response_expected()) || (!oneway && ri.response_expected()));

      // TODO: test sync scope

      //
      // Test: reply status is not available
      //
      try {
        ri.reply_status();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: forward reference is not available
      //
      try {
        org.omg.CORBA.Object ior = ri.forward_reference();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      if (op.equals("test_service_context")) {
        //
        // Test: get_request_service_context
        //
        try {
          org.omg.IOP.ServiceContext sc = ri.get_request_service_context(REQUEST_CONTEXT_ID.value);
          TEST(sc.context_id == REQUEST_CONTEXT_ID.value);
        } catch (BAD_PARAM ex) {
          TEST(false);
        }

        //
        // Test: add_reply_service_context
        //
        ReplyContext context = new ReplyContext();
        context.data = "reply2";
        context.val = 102;
        Any any = orb_.create_any();
        ReplyContextHelper.insert(any, context);
        byte[] data = null;
        try {
          data = cdrCodec_.encode_value(any);
        } catch (org.omg.IOP.CodecPackage.InvalidTypeForEncoding ex) {
          TEST(false);
        }

        org.omg.IOP.ServiceContext sc = new org.omg.IOP.ServiceContext();
        sc.context_id = REPLY_CONTEXT_2_ID.value;
        sc.context_data = new byte[data.length];
        System.arraycopy(data, 0, sc.context_data, 0, data.length);

        try {
          ri.add_reply_service_context(sc, false);
        } catch (BAD_INV_ORDER ex) {
          TEST(false);
        }

        //
        // Test: add same context again (no replace)
        //
        try {
          ri.add_reply_service_context(sc, false);
          TEST(false);
        } catch (BAD_INV_ORDER ex) {
          // Expected
        }

        //
        // Test: add same context again (replace)
        //
        try {
          ri.add_reply_service_context(sc, true);
        } catch (BAD_INV_ORDER ex) {
          TEST(false);
        }

        //
        // Test: replace context added in
        // receive_request_service_context
        //
        context.data = "reply4";
        context.val = 114;
        ReplyContextHelper.insert(any, context);
        try {
          data = cdrCodec_.encode_value(any);
        } catch (org.omg.IOP.CodecPackage.InvalidTypeForEncoding ex) {
          TEST(false);
        }

        sc.context_id = REPLY_CONTEXT_4_ID.value;
        sc.context_data = new byte[data.length];
        System.arraycopy(data, 0, sc.context_data, 0, data.length);

        try {
          ri.add_reply_service_context(sc, true);
        } catch (BAD_INV_ORDER ex) {
          TEST(false);
        }
      } else {
        //
        // Test: get_request_service_context
        //
        try {
          org.omg.IOP.ServiceContext sc = ri.get_request_service_context(REQUEST_CONTEXT_ID.value);
          TEST(false);
        } catch (BAD_PARAM ex) {
          // Expected
        }
      }

      //
      // Test: get_reply_service_context
      //
      try {
        org.omg.IOP.ServiceContext sc = ri.get_reply_service_context(REPLY_CONTEXT_1_ID.value);
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: sending exception is not available
      //
      try {
        Any any = ri.sending_exception();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: object id is correct
      //
      byte[] oid = ri.object_id();
      TEST(
          (oid.length == 4 && (new String(oid)).equals("test"))
              || (oid.length == 7 && (new String(oid)).equals("testDSI")));

      //
      // Test: adapter id is correct (this is a tough one to test)
      //
      byte[] adapterId = ri.adapter_id();
      TEST(adapterId.length != 0);

      //
      // Test: servant most derived interface is correct
      //
      String mdi = ri.target_most_derived_interface();
      TEST(mdi.equals("IDL:TestInterface:1.0"));

      //
      // Test: server id is correct
      //
      String serverId = ri.server_id();
      TEST(serverId.equals(""));

      //
      // Test: orb id is correct
      //
      String orbId = ri.orb_id();
      TEST(orbId.equals("myORB"));

      //
      // Test: adapter name is correct
      //
      String[] adapterName = ri.adapter_name();
      TEST(adapterName.length == 1 && adapterName[0].equals("persistent"));

      //
      // Test: servant is a is correct
      //
      TEST(ri.target_is_a("IDL:TestInterface:1.0"));

      //
      // Test: get_server_policy
      //
      Policy policy = ri.get_server_policy(MY_SERVER_POLICY_ID.value);
      MyServerPolicy myServerPolicy = MyServerPolicyHelper.narrow(policy);
      TEST(myServerPolicy != null);
      TEST(myServerPolicy.value() == 10);

      try {
        policy = ri.get_server_policy(1013);
        TEST(false);
      } catch (INV_POLICY ex) {
        // Expected
      }
    } catch (test.common.TestException ex) {
      ex.printStackTrace();
      throw ex;
    }
  }
  public void receive_request_service_contexts(ServerRequestInfo ri) {
    try {
      //
      // Test: get operation name
      //
      String op = ri.operation();

      boolean oneway = (op.equals("noargs_oneway"));

      //
      // Test: Arguments should not be available
      //
      try {
        org.omg.Dynamic.Parameter[] args = ri.arguments();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      // TODO: test operation_context

      //
      // Test: result is not available
      //
      try {
        Any result = ri.result();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: exceptions
      //
      try {
        TypeCode[] exceptions = ri.exceptions();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: response expected and oneway should be equivalent
      //
      TEST((oneway && !ri.response_expected()) || (!oneway && ri.response_expected()));

      // TODO: test sync scope

      //
      // Test: reply status is not available
      //
      try {
        ri.reply_status();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: forward reference is not available
      //
      try {
        org.omg.CORBA.Object ior = ri.forward_reference();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: object id is not available
      //
      try {
        byte[] id = ri.object_id();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: adapter id is not available
      //
      try {
        byte[] id = ri.adapter_id();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: servant_most_derived_interface is not available
      //
      try {
        String mdi = ri.target_most_derived_interface();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: server id is not available
      //
      try {
        String id = ri.server_id();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: orb id is not available
      //
      try {
        String id = ri.orb_id();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: adapter name is not available
      //
      try {
        String[] name = ri.adapter_name();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: servant_is_a is not available
      //
      try {
        ri.target_is_a("");
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      if (op.equals("test_service_context")) {
        //
        // Test: get_request_service_context
        //
        try {
          org.omg.IOP.ServiceContext sc = ri.get_request_service_context(REQUEST_CONTEXT_ID.value);
          TEST(sc.context_id == REQUEST_CONTEXT_ID.value);
          byte[] data = new byte[sc.context_data.length];
          System.arraycopy(sc.context_data, 0, data, 0, sc.context_data.length);

          Any any = null;
          try {
            any = cdrCodec_.decode_value(data, RequestContextHelper.type());
          } catch (org.omg.IOP.CodecPackage.FormatMismatch ex) {
            TEST(false);
          } catch (org.omg.IOP.CodecPackage.TypeMismatch ex) {
            TEST(false);
          }
          RequestContext context = RequestContextHelper.extract(any);
          TEST(context.data.equals("request"));
          TEST(context.val == 10);

          //
          // Test: PortableInterceptor::Current
          //
          Any slotData = orb_.create_any();
          slotData.insert_long(context.val);
          try {
            ri.set_slot(0, slotData);
          } catch (InvalidSlot ex) {
            TEST(false);
          }
        } catch (BAD_PARAM ex) {
          TEST(false);
        }

        //
        // Test: add_reply_service_context
        //
        ReplyContext context = new ReplyContext();
        context.data = "reply1";
        context.val = 101;
        Any any = orb_.create_any();
        ReplyContextHelper.insert(any, context);
        byte[] data = null;
        try {
          data = cdrCodec_.encode_value(any);
        } catch (org.omg.IOP.CodecPackage.InvalidTypeForEncoding ex) {
          TEST(false);
        }

        org.omg.IOP.ServiceContext sc = new org.omg.IOP.ServiceContext();
        sc.context_id = REPLY_CONTEXT_1_ID.value;
        sc.context_data = new byte[data.length];
        System.arraycopy(data, 0, sc.context_data, 0, data.length);

        try {
          ri.add_reply_service_context(sc, false);
        } catch (BAD_INV_ORDER ex) {
          TEST(false);
        }

        //
        // Test: add same context again (no replace)
        //
        try {
          ri.add_reply_service_context(sc, false);
          TEST(false);
        } catch (BAD_INV_ORDER ex) {
          // Expected
        }

        //
        // Test: add same context again (replace)
        //
        try {
          ri.add_reply_service_context(sc, true);
        } catch (BAD_INV_ORDER ex) {
          TEST(false);
        }

        //
        // Test: add second context
        //
        context.data = "reply4";
        context.val = 104;
        ReplyContextHelper.insert(any, context);
        try {
          data = cdrCodec_.encode_value(any);
        } catch (org.omg.IOP.CodecPackage.InvalidTypeForEncoding ex) {
          TEST(false);
        }

        sc.context_id = REPLY_CONTEXT_4_ID.value;
        sc.context_data = new byte[data.length];
        System.arraycopy(data, 0, sc.context_data, 0, data.length);

        // try
        // {
        ri.add_reply_service_context(sc, false);
        // }
        // catch(BAD_INV_ORDER ex)
        // {
        // TEST(false);
        // }
      } else {
        //
        // Test: get_request_service_context
        //
        try {
          org.omg.IOP.ServiceContext sc = ri.get_request_service_context(REQUEST_CONTEXT_ID.value);
          TEST(false);
        } catch (BAD_PARAM ex) {
          // Expected
        }
      }

      //
      // Test: get_reply_service_context
      //
      try {
        org.omg.IOP.ServiceContext sc = ri.get_reply_service_context(REPLY_CONTEXT_1_ID.value);
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: sending exception is not available
      //
      try {
        Any any = ri.sending_exception();
        TEST(false);
      } catch (BAD_INV_ORDER ex) {
        // Expected
      }

      //
      // Test: get_server_policy
      //
      Policy policy = ri.get_server_policy(MY_SERVER_POLICY_ID.value);
      MyServerPolicy myServerPolicy = MyServerPolicyHelper.narrow(policy);
      TEST(myServerPolicy != null);
      TEST(myServerPolicy.value() == 10);

      try {
        policy = ri.get_server_policy(1013);
        TEST(false);
      } catch (INV_POLICY ex) {
        // Expected
      }
    } catch (test.common.TestException ex) {
      ex.printStackTrace();
      throw ex;
    }
  }
  private void testServiceContext(String op, ServerRequestInfo ri, boolean addContext) {
    if (op.equals("test_service_context")) {
      //
      // Test: get_request_service_context
      //
      try {
        org.omg.IOP.ServiceContext sc = ri.get_request_service_context(REQUEST_CONTEXT_ID.value);
        TEST(sc.context_id == REQUEST_CONTEXT_ID.value);
      } catch (BAD_PARAM ex) {
        TEST(false);
      }

      //
      // Test: get_reply_service_context
      //
      org.omg.IOP.ServiceContext sc = null;
      try {
        sc = ri.get_reply_service_context(REPLY_CONTEXT_4_ID.value);
      } catch (BAD_INV_ORDER ex) {
        TEST(false);
      }
      byte[] data = new byte[sc.context_data.length];
      System.arraycopy(sc.context_data, 0, data, 0, sc.context_data.length);

      Any any = null;
      try {
        any = cdrCodec_.decode_value(data, ReplyContextHelper.type());
      } catch (org.omg.IOP.CodecPackage.FormatMismatch ex) {
        TEST(false);
      } catch (org.omg.IOP.CodecPackage.TypeMismatch ex) {
        TEST(false);
      }
      ReplyContext context = ReplyContextHelper.extract(any);
      TEST(context.data.equals("reply4"));
      TEST(context.val == 114);

      if (addContext) {
        //
        // Test: add_reply_service_context
        //
        context.data = "reply3";
        context.val = 103;
        any = orb_.create_any();
        ReplyContextHelper.insert(any, context);
        try {
          data = cdrCodec_.encode_value(any);
        } catch (org.omg.IOP.CodecPackage.InvalidTypeForEncoding ex) {
          TEST(false);
        }

        sc.context_id = REPLY_CONTEXT_3_ID.value;
        sc.context_data = new byte[data.length];
        System.arraycopy(data, 0, sc.context_data, 0, data.length);

        try {
          ri.add_reply_service_context(sc, false);
        } catch (BAD_INV_ORDER ex) {
          TEST(false);
        }

        //
        // Test: add same context again (no replace)
        //
        try {
          ri.add_reply_service_context(sc, false);
          TEST(false);
        } catch (BAD_INV_ORDER ex) {
          // Expected
        }

        //
        // Test: add same context again (replace)
        //
        try {
          ri.add_reply_service_context(sc, true);
        } catch (BAD_INV_ORDER ex) {
          TEST(false);
        }

        //
        // Test: replace context added in receive_request
        //
        context.data = "reply4";
        context.val = 124;
        ReplyContextHelper.insert(any, context);
        try {
          data = cdrCodec_.encode_value(any);
        } catch (org.omg.IOP.CodecPackage.InvalidTypeForEncoding ex) {
          TEST(false);
        }

        sc.context_id = REPLY_CONTEXT_4_ID.value;
        sc.context_data = new byte[data.length];
        System.arraycopy(data, 0, sc.context_data, 0, data.length);

        try {
          ri.add_reply_service_context(sc, true);
        } catch (BAD_INV_ORDER ex) {
          TEST(false);
        }
      }
    } else {
      try {
        org.omg.IOP.ServiceContext sc = ri.get_request_service_context(REQUEST_CONTEXT_ID.value);
        TEST(false);
      } catch (BAD_PARAM ex) {
        // Expected
      }
      try {
        org.omg.IOP.ServiceContext sc = ri.get_reply_service_context(REPLY_CONTEXT_1_ID.value);
        TEST(false);
      } catch (BAD_PARAM ex) {
        // Expected
      }
    }
  }
Esempio n. 10
0
  /** @param args the command line arguments */
  public static void main(String args[]) {

    try {
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // get reference to rootpoa & activate the POAManager
      POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      rootpoa.the_POAManager().activate();

      // create servant
      Log_viewerImpl log_viewerImpl = new Log_viewerImpl();
      log_viewerImpl.setORB(orb);

      LogFrame frame = new LogFrame(log_viewerImpl);
      frame.setVisible(true);

      log_viewerImpl.setFrame(frame);

      // get object reference from the servant
      org.omg.CORBA.Object ref = rootpoa.servant_to_reference(log_viewerImpl);
      Log_viewer href = Log_viewerHelper.narrow(ref);

      // read stringified Registry to file
      FileReader fr = new FileReader(IORFILE);
      BufferedReader br = new BufferedReader(fr);
      String remoteRegistryIOR = br.readLine();

      // get the romote Registry
      org.omg.CORBA.Object ncobj = orb.string_to_object(remoteRegistryIOR);
      NamingContext rootNC = NamingContextHelper.narrow(ncobj);
      frame.println("Obtained Name Service reference.");
      log_viewerImpl.serRootNC(rootNC);

      NameComponent[] name = new NameComponent[1];
      name[0] = new NameComponent("Logger", "");

      try {

        rootNC.bind(name, href);

      } catch (org.omg.CORBA.UserException ue) {
        ue.printStackTrace();
        System.exit(-1);
      }

      frame.println("Logger Remote Interface bound in Name Service");

      // wait for invocations from client
      frame.println("Logger ready and waiting ...");
      orb.run();

      frame.println("Logger Exiting ...");
      System.out.println("Logger Exiting ...");

    } catch (Exception e) {
      System.err.println("ERROR: " + e);

      // e.printStackTrace(System.out);
    }
  }
Esempio n. 11
0
 private void cmdDisconnect() {
   // close main window
   this.dispose();
   System.exit(0);
 }