Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1153

Client container needs an java:comp/ORB binding

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Duplicate
    • Icon: Major Major
    • 1.0.0-Beta5
    • None
    • None
    • None

      EE.5.11ORB References

      Some Java EE applications will need to make use of the CORBA ORB to perform certain operations. Such applications can find an appropriate object implementing the ORB interface by looking up the JNDI name java:comp/ORB or by requesting injection of an ORB object. The container is required to provide the java:comp/ORB name for all components except applets. Any such reference to a ORB object is only valid within the component instance that performed the lookup.
      The following example illustrates how an application component acquires and uses an ORB object via injection.
      @Resource ORB orb;
      public void method(...) {
      ...
      // Get the POA to use when creating object references.
      POA rootPOA = (POA)orb.resolve_initial_references("RootPOA");
      ...
      }
      The following example illustrates how an application component acquires and uses an ORB object using a JNDI lookup.
      public void method(...) {
      ...
      // Obtain the default initial JNDI context.
      Context initCtx = new InitialContext();
      // Look up the ORB object.
      ORB orb = (ORB)initCtx.lookup("java:comp/ORB");
      // Get the POA to use when creating object references.
      POA rootPOA = (POA)orb.resolve_initial_references("RootPOA");

              Unassigned Unassigned
              starksm64 Scott Stark (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: