Exemple #1
0
 /*    */ public static synchronized TypeCode type() /*    */ {
   /* 32 */ if (__typeCode == null)
   /*    */ {
     /* 34 */ synchronized (TypeCode.class)
     /*    */ {
       /* 36 */ if (__typeCode == null)
       /*    */ {
         /* 38 */ if (__active)
         /*    */ {
           /* 40 */ return ORB.init().create_recursive_tc(_id);
           /*    */ }
         /* 42 */ __active = true;
         /* 43 */ StructMember[] arrayOfStructMember = new StructMember[1];
         /* 44 */ TypeCode localTypeCode = null;
         /* 45 */ localTypeCode = ORB.init().create_string_tc(0);
         /* 46 */ arrayOfStructMember[0] = new StructMember("name", localTypeCode, null);
         /*    */
         /* 50 */ __typeCode =
             ORB.init().create_exception_tc(id(), "DuplicateName", arrayOfStructMember);
         /* 51 */ __active = false;
         /*    */ }
       /*    */ }
     /*    */ }
   /* 55 */ return __typeCode;
   /*    */ }
Exemple #2
0
  public void testThereShouldBeOnlyOneLogfile() throws Exception {
    File dir = TestUtils.createTempDir("bugjac384");

    Properties props = new Properties();

    props.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
    props.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");
    props.setProperty("jacorb.log.default.verbosity", "4");
    props.setProperty("jacorb.logfile", dir.getAbsolutePath() + "/logfile.txt");
    props.setProperty("jacorb.logfile.append", "on");
    props.setProperty("jacorb.logfile.maxLogSize", "1500");
    props.setProperty("jacorb.logfile.rotateCount", "2");

    ORB orb = ORB.init(new String[0], props);
    orb.shutdown(true);
    ((org.jacorb.config.JacORBConfiguration) ((org.jacorb.orb.ORB) orb).getConfiguration())
        .shutdownLogging();
    orb = ORB.init(new String[0], props);
    POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
    poa.destroy(true, true);
    orb.shutdown(true);

    ((org.jacorb.config.JacORBConfiguration) ((org.jacorb.orb.ORB) orb).getConfiguration())
        .shutdownLogging();

    final String[] list = dir.list();
    assertEquals(Arrays.asList(list).toString(), 2, list.length);
  }
 /*     */ public static synchronized TypeCode type() /*     */ {
   /*  65 */ if (__typeCode == null)
   /*     */ {
     /*  67 */ __typeCode = ValueMemberHelper.type();
     /*  68 */ __typeCode = ORB.init().create_sequence_tc(0, __typeCode);
     /*  69 */ __typeCode = ORB.init().create_alias_tc(id(), "ValueMemberSeq", __typeCode);
     /*     */ }
   /*  71 */ return __typeCode;
   /*     */ }
Exemple #4
0
  public void init() {
    add(intitule);
    add(texte);
    add(bouton);
    bouton.addActionListener(this);

    try {
      ORB orb = ORB.init(this, null);
      FileReader file = new FileReader(iorfile.value);
      BufferedReader in = new BufferedReader(file);
      String ior = in.readLine();
      file.close();
      org.omg.CORBA.Object obj = orb.string_to_object(ior);
      annuaire = AnnuaireHelper.narrow(obj);

    } catch (org.omg.CORBA.SystemException ex) {
      System.err.println("Error");
      ex.printStackTrace();
    } catch (FileNotFoundException fnfe) {
      System.err.println(fnfe.getMessage());
    } catch (IOException io) {
      System.err.println(io.getMessage());
    } catch (Exception e) {
      System.err.println(e.getMessage());
    }
  }
 /*    */ public static synchronized TypeCode type() /*    */ {
   /* 31 */ if (__typeCode == null)
   /*    */ {
     /* 33 */ __typeCode = ORB.init().create_interface_tc(id(), "ServerManager");
     /*    */ }
   /* 35 */ return __typeCode;
   /*    */ }
 static {
   ORB orb = ORB.init();
   PRIMITIVE_TYPES.put("long", orb.get_primitive_tc(TCKind.tk_long));
   PRIMITIVE_TYPES.put("ulong", orb.get_primitive_tc(TCKind.tk_ulong));
   PRIMITIVE_TYPES.put("longlong", orb.get_primitive_tc(TCKind.tk_longlong));
   PRIMITIVE_TYPES.put("ulonglong", orb.get_primitive_tc(TCKind.tk_ulonglong));
   PRIMITIVE_TYPES.put("short", orb.get_primitive_tc(TCKind.tk_short));
   PRIMITIVE_TYPES.put("ushort", orb.get_primitive_tc(TCKind.tk_ushort));
   PRIMITIVE_TYPES.put("float", orb.get_primitive_tc(TCKind.tk_float));
   PRIMITIVE_TYPES.put("double", orb.get_primitive_tc(TCKind.tk_double));
   PRIMITIVE_TYPES.put("char", orb.get_primitive_tc(TCKind.tk_char));
   PRIMITIVE_TYPES.put("wchar", orb.get_primitive_tc(TCKind.tk_wchar));
   PRIMITIVE_TYPES.put("boolean", orb.get_primitive_tc(TCKind.tk_boolean));
   PRIMITIVE_TYPES.put("octet", orb.get_primitive_tc(TCKind.tk_octet));
   PRIMITIVE_TYPES.put("string", orb.get_primitive_tc(TCKind.tk_string));
   PRIMITIVE_TYPES.put("wstring", orb.get_primitive_tc(TCKind.tk_wstring));
   PRIMITIVE_TYPES.put("any", orb.get_primitive_tc(TCKind.tk_any));
   PRIMITIVE_TYPES.put("longdouble", orb.get_primitive_tc(TCKind.tk_longdouble));
   PRIMITIVE_TYPES.put("void", orb.get_primitive_tc(TCKind.tk_void));
   // PRIMITIVE_TYPES.put("dateTime",orb.get_primitive_tc(TCKind.tk_dateTime));
   // PRIMITIVE_TYPES.put("date",orb.get_primitive_tc(TCKind.tk_date));
   // PRIMITIVE_TYPES.put("time",orb.get_primitive_tc(TCKind.tk_time));
   // PRIMITIVE_TYPES.put("positiveInteger",orb.get_primitive_tc(TCKind.tk_positiveInteger));
   // PRIMITIVE_TYPES.put("nonPositiveInteger",orb.get_primitive_tc(TCKind.tk_nonPositiveInteger));
   // PRIMITIVE_TYPES.put("negativeInteger",orb.get_primitive_tc(TCKind.tk_negativeInteger));
   // PRIMITIVE_TYPES.put("nonNegativeInteger",orb.get_primitive_tc(TCKind.tk_nonNegativeInteger));
 }
Exemple #7
0
  public static void main(String args[]) {
    try {
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      System.out.println("ORB initialised\n");

      // get the root naming context
      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");

      // Use NamingContextExt instead of NamingContext,
      // part of the Interoperable naming Service.
      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

      // resolve the Object Reference in Naming
      String name = "Hello1";
      helloImpl = HelloHelper.narrow(ncRef.resolve_str(name));

      System.out.println("Obtained a handle on server object: " + helloImpl);
      System.out.println(helloImpl.sayHello());
      helloImpl.shutdown();

    } catch (Exception e) {
      System.out.println("ERROR : " + e);
      e.printStackTrace(System.out);
    }
  } // end main
 /*    */ public static synchronized TypeCode type() /*    */ {
   /* 31 */ if (__typeCode == null)
   /*    */ {
     /* 33 */ __typeCode = ORB.init().create_interface_tc(id(), "IORInterceptor_3_0");
     /*    */ }
   /* 35 */ return __typeCode;
   /*    */ }
  public static void main(String[] args) {
    try {
      // init ORB
      ORB orb = ORB.init(args, null);

      // init POA
      POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));

      poa.the_POAManager().activate();

      // create a Adder object
      AdderImpl adderImpl = new AdderImpl();

      // create the object reference
      org.omg.CORBA.Object adderRef = poa.servant_to_reference(adderImpl);

      org.omg.CORBA.Object nsObject = orb.resolve_initial_references("NameService");
      NamingContextExt nc = NamingContextExtHelper.narrow(nsObject);

      nc.rebind(nc.to_name("Adder"), adderRef);

      // wait for requests
      orb.run();
    } catch (Exception e) {
      System.out.println(e);
    }
  }
  public NotificationTestCaseSetup() throws Exception {
    ifrServerSetup =
        new IFRServerSetup(
            TestUtils.testHome() + "/src/test/idl/TypedNotification.idl", null, null);

    ORBSetUp();

    serverORB = ORB.init(new String[0], orbProps);

    POAHelper.narrow(serverORB.resolve_initial_references("RootPOA")).the_POAManager().activate();

    container_ = PicoContainerFactory.createRootContainer((org.jacorb.orb.ORB) serverORB);
    container_.unregisterComponent(Repository.class);
    container_.registerComponent(
        new AbstractComponentAdapter(Repository.class, Repository.class) {

          public Object getComponentInstance(PicoContainer picocontainer)
              throws PicoInitializationException, PicoIntrospectionException {
            try {
              return getRepository();
            } catch (Exception e) {
              throw new RuntimeException(e);
            }
          }

          public void verify(PicoContainer picocontainer) throws PicoIntrospectionException {}
        });

    testUtils_ = new NotificationTestUtils(getServerORB());

    POAHelper.narrow(orb.resolve_initial_references("RootPOA")).the_POAManager().activate();
  }
Exemple #11
0
  public void run() {

    try {
      ORB orb = ORB.init(args, null);
      // get reference to rootpoa & activate the POAManager
      POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      poa.the_POAManager().activate();

      // get the root naming context
      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
      // Use NamingContextExt which is part of the Interoperable
      // Naming Service (INS) specification.
      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
      DomainParticipantFactoryImpl impl = new DomainParticipantFactoryImpl(orb, poa);

      // get object reference from the servant (and implicitly register
      // it)
      org.omg.CORBA.Object oref = poa.servant_to_reference(impl);
      DomainParticipantFactory ref = DomainParticipantFactoryHelper.narrow(oref);

      if (ncRef != null) {
        // bind the Object Reference in Naming
        NameComponent path[] = ncRef.to_name("DomainParticipantFactory");
        ncRef.rebind(path, ref);
      }
      System.out.println("Server ready and waiting ...");
      orb.run();
    } catch (Exception e) {
      System.out.println("e" + e);
      e.printStackTrace();
    }
  }
 /** Create the type code for this exception. */
 public static TypeCode type() {
   if (typeCode == null) {
     if (typeCode == null)
       typeCode = ORB.init().create_struct_tc(id(), "InvalidName", new StructMember[0]);
   }
   return typeCode;
 }
Exemple #13
0
  public KerberosServer(String[] args) {
    try {
      // initialize the ORB and POA.
      orb = ORB.init(args, null);
      POA rootPOA = (POA) orb.resolve_initial_references("RootPOA");
      org.omg.CORBA.Policy[] policies = new org.omg.CORBA.Policy[3];
      policies[0] = rootPOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID);
      policies[1] = rootPOA.create_lifespan_policy(LifespanPolicyValue.PERSISTENT);
      Any sasAny = orb.create_any();
      SASPolicyValuesHelper.insert(
          sasAny,
          new SASPolicyValues(EstablishTrustInClient.value, EstablishTrustInClient.value, true));
      policies[2] = orb.create_policy(SAS_POLICY_TYPE.value, sasAny);
      POA securePOA = rootPOA.create_POA("SecurePOA", rootPOA.the_POAManager(), policies);
      rootPOA.the_POAManager().activate();

      // create object and write out IOR
      securePOA.activate_object_with_id("SecureObject".getBytes(), this);
      org.omg.CORBA.Object demo = securePOA.servant_to_reference(this);
      PrintWriter pw = new PrintWriter(new FileWriter(args[0]));
      pw.println(orb.object_to_string(demo));
      pw.flush();
      pw.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Exemple #14
0
  public static ORB getORB() {
    synchronized (ORBFactory.class) {
      if (orb == null) {
        Properties properties;
        try {
          properties =
              (Properties)
                  AccessController.doPrivileged(
                      new PrivilegedAction() {
                        public Object run() {
                          return System.getProperties();
                        }
                      });
        } catch (SecurityException ignored) {
          log.trace("Unable to retrieve system properties", ignored);
          properties = null;
        }

        // Create the singleton ORB
        orb = ORB.init(new String[0], properties);

        // Activate the root POA
        try {
          POA rootPOA = (POA) orb.resolve_initial_references("RootPOA");
          rootPOA.the_POAManager().activate();
        } catch (Throwable t) {
          log.warn("Unable to activate POA", t);
        }
      }
      return orb;
    }
  }
 public MasterServant(MasterComponent comp) {
   String[] args = new String[1];
   args[0] = "inicio";
   orb = ORB.init(args, null);
   num_partitions = 0;
   myComp = comp;
 }
  public static void main(String[] args) {
    try {
      String tableID = "Test-Tafel2";
      ORB _orb;
      Properties props = new Properties();

      props.put("org.omg.CORBA.ORBInitialPort", "1050");
      props.put("org.omg.CORBA.ORBInitialHost", "192.168.2.20");

      _orb = ORB.init(new String[0], props);

      org.omg.CORBA.Object objRef = _orb.resolve_initial_references("NameService");
      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

      BoardService boardServiceObj =
          (BoardService) BoardServiceHelper.narrow(ncRef.resolve_str(tableID + "/BoardService"));

      User _user1 = new User("Yumo");
      boardServiceObj.sendMessage(
          _user1,
          new Message("Hallo Test-Tafel no. 1", _user1.name, new Date().toString()),
          tableID);

    } catch (InvalidName ex) {
      Logger.getLogger(BoardServiceTestbench.class.getName()).log(Level.SEVERE, null, ex);
    } catch (NotFound ex) {
      Logger.getLogger(BoardServiceTestbench.class.getName()).log(Level.SEVERE, null, ex);
    } catch (CannotProceed ex) {
      Logger.getLogger(BoardServiceTestbench.class.getName()).log(Level.SEVERE, null, ex);
    } catch (org.omg.CosNaming.NamingContextPackage.InvalidName ex) {
      Logger.getLogger(BoardServiceTestbench.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnknownUser ex) {
      Logger.getLogger(BoardServiceTestbench.class.getName()).log(Level.SEVERE, null, ex);
    }
  }
Exemple #17
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);
  }
 @Override
 public Any toAny() {
   Any any = ORB.init().create_any();
   if (this.value != null) {
     insert(any, this.value);
   }
   return any;
 }
  /**
   * {@.ja 指定された引数に基づいてORBオブジェクトを生成後、取得する} {@.en Generates the ORB object based on the specified
   * argument, and gets it. }
   *
   * <p>{@.ja すでにORBオブジェクトが生成済みの場合は、それが取得される} {@.en When the ORB object is generated, it is
   * returned}
   *
   * @param args {@.ja ORBオブジェクト生成時の引数} {@.en Argument for ORB object generation}
   * @return {@.ja ORBオブジェクト} {@.en ORB object}
   */
  public static ORB getOrb(String[] args, Properties prop) {

    if (orb == null) {
      orb = ORB.init(args, prop);
    }

    return orb;
  }
 /** Create the ObjectNotActive typecode (empty structure, named "ObjectNotActive"). */
 public static TypeCode type() {
   if (typeCode == null) {
     ORB orb = ORB.init();
     StructMember[] members = new StructMember[0];
     typeCode = orb.create_exception_tc(id(), "ObjectNotActive", members);
   }
   return typeCode;
 }
Exemple #21
0
  /**
   * ASN.1-encode an {@code InitialContextToken} as defined in RFC 2743, Section 3.1,
   * "Mechanism-Independent Token Format", pp. 81-82. The encoded token contains the ASN.1 tag 0x60,
   * followed by a token length (which is itself stored in a variable-length format and takes 1 to 5
   * bytes), the GSSUP mechanism identifier, and a mechanism-specific token, which in this case is a
   * CDR encapsulation of the GSSUP {@code InitialContextToken} in the {@code authToken} parameter.
   *
   * @param authToken the {@code InitialContextToken} to be encoded.
   * @param codec the {@code Codec} used to encode the token.
   * @return a {@code byte[]} representing the encoded token.
   */
  public static byte[] encodeInitialContextToken(InitialContextToken authToken, Codec codec) {
    byte[] out;
    Any any = ORB.init().create_any();
    InitialContextTokenHelper.insert(any, authToken);
    try {
      out = codec.encode_value(any);
    } catch (Exception e) {
      return new byte[0];
    }

    int length = out.length + gssUpMechOidArray.length;
    int n;

    if (length < (1 << 7)) {
      n = 0;
    } else if (length < (1 << 8)) {
      n = 1;
    } else if (length < (1 << 16)) {
      n = 2;
    } else if (length < (1 << 24)) {
      n = 3;
    } else { // if (length < (1 << 32))
      n = 4;
    }

    byte[] encodedToken = new byte[2 + n + length];
    encodedToken[0] = 0x60;

    if (n == 0) {
      encodedToken[1] = (byte) length;
    } else {
      encodedToken[1] = (byte) (n | 0x80);
      switch (n) {
        case 1:
          encodedToken[2] = (byte) length;
          break;
        case 2:
          encodedToken[2] = (byte) (length >> 8);
          encodedToken[3] = (byte) length;
          break;
        case 3:
          encodedToken[2] = (byte) (length >> 16);
          encodedToken[3] = (byte) (length >> 8);
          encodedToken[4] = (byte) length;
          break;
        default: // case 4:
          encodedToken[2] = (byte) (length >> 24);
          encodedToken[3] = (byte) (length >> 16);
          encodedToken[4] = (byte) (length >> 8);
          encodedToken[5] = (byte) length;
      }
    }
    System.arraycopy(gssUpMechOidArray, 0, encodedToken, 2 + n, gssUpMechOidArray.length);
    System.arraycopy(out, 0, encodedToken, 2 + n + gssUpMechOidArray.length, out.length);

    return encodedToken;
  }
 @BeforeClass
 public static void setUpBeforeClass() throws Exception {
   ORB orb = ORB.init(new String[0], System.getProperties());
   URL url = ApplicationElementImpl.class.getResource("/de/rechner/openatfx/example.atfx");
   aoSession =
       AoServiceFactory.getInstance()
           .newAoFactory(orb)
           .newSession("FILENAME=" + new File(url.getFile()));
   applicationElement = aoSession.getApplicationStructure().getElementByName("dts");
 }
Exemple #23
0
  public static WrapperFactory getInstance() {
    if (instance == null) {
      instance = new WrapperFactory();

      if (orb == null) {
        orb = ORB.init(new String[0], null);
      }
    }

    return instance;
  }
Exemple #24
0
  public static void main(String args[]) {
    if (args.length == 0) {
      System.out.println("Koordinator Namen eingeben...");
    } else {

      try {
        // ORB Eigenschaften setzen
        Properties props = new Properties();
        props.put("org.omg.CORBA.ORBInitialPort", "1050");
        props.put("org.omg.CORBA.ORBInitialHost", "localhost");
        orb = ORB.init(args, props);

        // Referenz von rootPOA holen und POA Manager aktivieren
        POA rootPoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
        rootPoa.the_POAManager().activate();

        // NamingContext besorgen
        NamingContextExt nc =
            NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));

        // Objektreferenz mit Namen "koordinator" besorgen
        org.omg.CORBA.Object obj = nc.resolve_str(args[1]);

        // Referenz fuer den Servant besorgen
        ggt.Koordinator koord = KoordinatorHelper.narrow(obj);

        // Servant erzeugen
        StarterImpl starter = new StarterImpl(args[0], koord, rootPoa);

        // Referenz fuer den Servant besorgen
        org.omg.CORBA.Object ref = rootPoa.servant_to_reference(starter);

        // Downcast Corba-Objekt -> koordinator
        ggt.Starter href = StarterHelper.narrow(ref);

        // starter bei koordinator anmelden
        koord.activateStarter(href, args[0]);

        // binde die Object Reference an einen Namen
        String name = args[0];
        NameComponent path[] = nc.to_name(name);
        nc.rebind(path, href);
        System.out.println("Koordinator laeuft ...");

        // Orb starten und auf Clients warten
        orb.run();
      } catch (Exception e) {
        System.err.println("Fehler: " + e);
        e.printStackTrace(System.out);
      }
      System.out.println("BankServer Exit");
    }
  }
 /*    */ public static synchronized TypeCode type() /*    */ {
   /* 35 */ if (__typeCode == null)
   /*    */ {
     /* 37 */ __typeCode =
         ORB.init()
             .create_enum_tc(
                 id(),
                 "NotFoundReason",
                 new String[] {"missing_node", "not_context", "not_object"});
     /*    */ }
   /* 39 */ return __typeCode;
   /*    */ }
  // Set up the client
  private void onConnectClicked() {
    // Create the arguments array
    String args[] = {
      "-ORBInitialHost", serverAddressField.getText(), "-ORBInitialPort", serverPortField.getText()
    };

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

      // get the root naming context
      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");

      // Use NamingContextExt instead of NamingContext. This is
      // part of the Interoperable naming Service.
      ncRef = NamingContextExtHelper.narrow(objRef);

      // resolve the Object Reference in Naming
      String name = "AuctionFactory";
      auctionFactoryImpl = AuctionFactoryHelper.narrow(ncRef.resolve_str(name));

      appletDisplay("Connected to server");

      // Activate the login functionality
      btnLogIn.setEnabled(true);
      usernameField.setEnabled(true);
      passwordField.setEnabled(true);

    } catch (Exception e) {
      appletDisplay("Unable to connect to server");
      System.out.println("ERROR : " + e);
      e.printStackTrace(System.out);

      // Deactivate functionality
      btnLogIn.setEnabled(false);
      usernameField.setEnabled(false);
      passwordField.setEnabled(false);
      btnRefresh.setEnabled(false);
      sellList.setEnabled(false);
      bidList.setEnabled(false);
      btnCreateNewAuction.setEnabled(false);
      txtDescription.setEnabled(false);
      txtStartingPrice.setEnabled(false);
      btnSellItem.setEnabled(false);
      btnBid.setEnabled(false);
      txtBidPrice.setEnabled(false);
      loggedIn = false;
    }
  }
Exemple #27
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*/
 @Override
 public void contextInitialized(ServletContextEvent sce) {
   log.info("Starting the ORB.");
   Properties orbProperties = new Properties();
   orbProperties.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
   orbProperties.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");
   String[] args = new String[0];
   ORB orb = ORB.init(args, orbProperties);
   sce.getServletContext().setAttribute("ORB", orb);
   log.info("ORB initialized.");
   OrbRunner orbRunner = new OrbRunner(orb);
   orbRunner.start();
   sce.getServletContext().setAttribute("ORBThread", orbRunner);
   log.info("ORB running.");
 }
  static {
    orb = ORB.init(new String[0], null);
    System.setProperty(
        "javax.rmi.CORBA.PortableRemoteObjectClass",
        PortableRemoteObjectDelegateImpl.class.getName());
    PortableRemoteObjectDelegateImpl.setORB(orb);

    try {
      POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      poa.the_POAManager().activate();
    } catch (InvalidName e) {
      initException = e;
    } catch (AdapterInactive e) {
      initException = e;
    }
  }
  /** Creation of a input descriptor based on a supplied Configuration instance. */
  public InputDescriptor(Configuration conf) {
    if (conf == null) throw new RuntimeException("Null configuration.");
    try {
      tag = conf.getAttribute("tag", "");
      required = conf.getAttributeAsBoolean("required", false);
      implied = conf.getAttributeAsBoolean("implied", false);
      type = ORB.init().create_interface_tc(conf.getAttribute("type", ""), "");

      Configuration[] children = conf.getChildren();
      if (children.length > 0) {
        criteria = DPML.buildCriteriaElement(children[0]);
      }
    } catch (Exception e) {
      throw new RuntimeException("Failed to configure a input usage decriptor.", e);
    }
  }