docs: public EJSHome getHomeByInterface(String application,
                                        String module,
                                        String beanInterface)
                      throws EJBNotFoundException
      {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "getHomeByInterface : " + application + ", " +
                           module + ", " + beanInterface);
  
          J2EEName j2eeName = null;
          AppLinkData linkData = getAppLinkData(application); // F743-26072
          if (linkData != null)
          {
              // If a module was specified, then look for a bean that implements
              // the interface in the module table first, as there is a better
              // chance of finding a single match, and this is consistent with
              // ejb-link behavior.                                              d446993
              if (module != null)
              {
                  synchronized (linkData)
                  {
                      Map<String, Set<J2EEName>> moduleTable = linkData.ivBeansByModuleByType.get(module);
  
                      if (moduleTable != null)
                      {
                          Set<J2EEName> beans = moduleTable.get(beanInterface);
  
                          if (beans != null && !beans.isEmpty())
                          {
                              if (beans.size() != 1)
                              {
                                  AmbiguousEJBReferenceException ex = new AmbiguousEJBReferenceException
                                                  ("The reference to bean interface " + beanInterface +
                                                   " is ambiguous. Module " + application +
                                                   "/" + module +
                                                   " contains multiple beans with the same interface.");
                                  if (isTraceOn && tc.isEntryEnabled())
                                      Tr.exit(tc, "getHomeByInterface : " + ex);
                                  throw ex;
                              }
  
                              j2eeName = beans.iterator().next();
  
                              if (isTraceOn && tc.isDebugEnabled())
                                  Tr.debug(tc, "Mapped beanInterface " + beanInterface + " to j2eeName " + j2eeName + " in current module.");
                          }
                          else
                          {
                              if (isTraceOn && tc.isDebugEnabled())
                                  Tr.debug(tc, "EJB with interface " + beanInterface +
                                               " not found in module " + module);
                          }
                      }
                  }
  
                  // If a bean was found, attempt to get the home outside of the linkData
                  // sync block to avoid a deadlock if the bean hasn't completed starting.
                  if (j2eeName != null)
                  {
                      EJSHome retHome = (EJSHome) getHome(j2eeName);
  
                      if (retHome != null)
                      {
                          if (isTraceOn && tc.isEntryEnabled())
                              Tr.exit(tc, "getHomeByInterface : " + retHome.getJ2EEName());
                          return retHome;
                      }
                      j2eeName = null;
                  }
              }
  
              synchronized (linkData)
              {
                  Set<J2EEName> beans = linkData.ivBeansByType.get(beanInterface);
                  if (beans != null && !beans.isEmpty())
                  {
                      if (beans.size() != 1)
                      {
                          AmbiguousEJBReferenceException ex = new AmbiguousEJBReferenceException
                                          ("The reference to bean interface " + beanInterface +
                                           " is ambiguous. Application " + application +
                                           " contains multiple beans with the same interface.");
                          if (isTraceOn && tc.isEntryEnabled())
                              Tr.exit(tc, "getHomeByInterface : " + ex);
                          throw ex;
                      }
  
                      j2eeName = beans.iterator().next();
                      if (isTraceOn && tc.isDebugEnabled())
                          Tr.debug(tc, "Mapped beanInterface " + beanInterface + " to j2eeName " + j2eeName + " in another module in the app.");
                  }
                  else
                  {
                      if (isTraceOn && tc.isDebugEnabled())
                          Tr.debug(tc, "EJB with interface " + beanInterface + " not found");
                  }
              }
  
              // If a bean was found, attempt to get the home outside of the linkData
              // sync block to avoid a deadlock if the bean hasn't completed starting.
              if (j2eeName != null)
              {
                  EJSHome retHome = (EJSHome) getHome(j2eeName);
  
                  if (retHome != null)
                  {
                      if (isTraceOn && tc.isEntryEnabled())
                          Tr.exit(tc, "getHomeByInterface : " + retHome.getJ2EEName());
                      return retHome;
                  }
              }
          }
          else
          {
              if (isTraceOn && tc.isDebugEnabled())
                  Tr.debug(tc, "Applicaton " + application + " not found");
          }
  
          EJBNotFoundException ex =
                          new EJBNotFoundException("EJB with interface " + beanInterface +
                                                   " not present in application " +
                                                   application + ".");
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "getHomeByInterface : " + ex);
          throw ex;
      }