Example #1
0
  public void foo() throws InterceptorOrderingException {
    try {
      Current current = (Current) orb.resolve_initial_references("PICurrent");

      Any any = current.get_slot(MyInitializer.slot_id);

      String s = any.extract_string();
      System.out.println("TestObjectImpl.foo, extracted from PICurrent: >>" + s + "<<");

      String expectedPiFlow =
          "JacOrbRocks:receive_request_service_contexts:preinvoke:receive_request:foo";
      if (!expectedPiFlow.equals(s)) {
        System.out.println("### THROWING EX " + expectedPiFlow + " and " + s);
        throw new InterceptorOrderingException();
      }

      System.out.println("TestObjectImpl.foo calling bar()");
      TestObjectHelper.narrow(_this_object()).bar();

    } catch (InterceptorOrderingException e) {
      throw e;
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Example #2
0
  /**
   * <code>test192Op</code> dummy impl.
   *
   * @return an <code>boolean</code> value depending upon the result of the interceptors. true for
   *     local; false for not local.
   */
  public boolean test192Op() {
    boolean result = false;

    try {
      Current current = (Current) orb.resolve_initial_references("PICurrent");

      Any anyName = current.get_slot(SInitializer.slotID);

      result = anyName.extract_boolean();
    } catch (InvalidSlot e) {
      e.printStackTrace();
      throw new INTERNAL(e.toString());
    } catch (InvalidName e) {
      e.printStackTrace();
      throw new INTERNAL(e.toString());
    }

    return result;
  }