code: private Object getRemoteHomeReference(EJSHome home, String interfaceName)
                      throws EJBException, NoSuchObjectException
      {
          Object retObj = null;
  
          try
          {
              checkHomeSupported(home, interfaceName);
  
              EJBRuntime runtime = home.getContainer().getEJBRuntime();
              runtime.checkRemoteSupported(home, interfaceName);
  
              EJSWrapper wrapper = home.getWrapper().getRemoteWrapper();
              retObj = runtime.getRemoteReference(wrapper);
          } catch (Throwable ex)
          {
              // ClassNotFoundException, CreateException, and NoSuchObjectException
              // must be caught here... but basically all failures that may occur
              // while creating the bean instance must cause the injection to fail.
              FFDCFilter.processException(ex, CLASS_NAME + ".getRemoteHomeReference",
                                          "281", this);
              EJBException ejbex = ExceptionUtil.EJBException
                              ("Failure obtaining remote home reference of " + home.getJ2EEName() +
                               " of type " + interfaceName, ex);
              // TODO : Tr.error
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "getRemoteHomeReference: " + ejbex);
  
              throw ejbex;
          }
  
          // This should never occur, but does cover the following 2 possibilites:
          // 1) one of the above factory calls returns null (unlikely)
          // 2) an attempt is being made to inject an MDB or 2.1 Entity (not supported)
          if (retObj == null)
          {
              EJBException ejbex = new EJBException
                              ("Unable to obtain remote reference of " + home.getJ2EEName() +
                               " of type " + interfaceName);
              // TODO : Tr.error
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "getRemoteHomeReference: " + ejbex);
  
              throw ejbex;
          }
  
          return retObj;
      }
docs: Encapsulates the common code and exception handling for obtaining
  a remote home reference (Stub) for the specified home interface,
  for lookup or injection. <p>
  
  @param home the internal home object of the referenced ejb.
  @param interfaceName the remote home interface to be injected.