docs: @Override
      public void resolve(InjectionBinding<EJB> binding)
                      throws InjectionException
      {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "resolve : " + binding);
  
          Reference ref = null;
          EJBInjectionBinding ejbBinding = (EJBInjectionBinding) binding;
          String refJndiName = ejbBinding.getJndiName();
          String interfaceName = ejbBinding.getInjectionClassTypeName();
  
          // -----------------------------------------------------------------------
          // First, check the ejb-ref binding map to see if a binding was provided
          // for this reference/injection. If a binding was provided, then an
          // IndirectJndiLookup Reference is bound into naming... to re-direct
          // the lookup to the 'bound' name.                               d440604.2
          // -----------------------------------------------------------------------
  
          String boundToJndiName = ejbBinding.ivBindingName; // d681743
  
          // -----------------------------------------------------------------------
          // If a JNDI name was not provided in the binding file, then also check
          // the new lookup attribute on @EJB (or lookup-name in xml).  F743-21028.4
          // -----------------------------------------------------------------------
          if (boundToJndiName == null)
          {
              boundToJndiName = ejbBinding.ivLookup;
  
              // An empty string may be 'normal' here... since it is the annotation
              // default, but also a customer may specify it in XML to disable the
              // annotation setting. If empty, use ejb-link or auto-link.
              if (boundToJndiName != null && boundToJndiName.equals("")) {
                  boundToJndiName = null;
              }
          }
  
          // -----------------------------------------------------------------------
          // If override reference factories have been registered for this processor
          // then call each factory until one of them provides an override (i.e. a
          // non-null value). If none of the factories provide an override, then
          // fall through and perform normal resolve processing.          F1339-9050
          // -----------------------------------------------------------------------
          if (ivOverrideReferenceFactories != null &&
              // F743-32443 - We can only check for override processors if we have
              // an interface name and a class loader.  Otherwise, we defer the
              // checking and use a different object factory.  See below.
              interfaceName != null && ejbBinding.ivClassLoader != null)
          {
              Class<?> injectType = ejbBinding.getInjectionClassTypeWithException();
              for (OverrideReferenceFactory<EJB> factory : ivOverrideReferenceFactories)
              {
                  // d696076 - Use J2EEName for runtime data structures.  We know
                  // J2EEName is non-null with non-null app/module because injectType
                  // is checked for null above, which means we have a class loader,
                  // which means this is not a non-java:comp code path.
                  J2EEName j2eeName = ivNameSpaceConfig.getJ2EEName();
                  ref = factory.createReference(j2eeName.getApplication(),
                                                j2eeName.getModule(),
                                                ejbBinding.ivBeanName,
                                                refJndiName,
                                                injectType,
                                                boundToJndiName,
                                                ejbBinding.getAnnotation());
                  if (ref != null)
                  {
                      binding.setObjects(null, ref);
  
                      if (isTraceOn && tc.isEntryEnabled())
                          Tr.exit(tc, "resolve", binding);
                      return;
                  }
              }
          }
  
          // -----------------------------------------------------------------------
          // If a binding was provided, then an IndirectJndiLookup Reference is
          // bound into naming... to re-direct the lookup to the 'bound' name.
          // -----------------------------------------------------------------------
          if (boundToJndiName != null)
          {
              if (ejbBinding.ivEjbLocalRef &&
                  !boundToJndiName.startsWith("java:") && // F743-21028.4
                  !boundToJndiName.startsWith("ejblocal:"))
              {
                  boundToJndiName = "ejblocal:".concat(boundToJndiName);
              }
  
              String beanInterfaceName = ejbBinding.getInjectionClassTypeName();
  
              if (isTraceOn && tc.isDebugEnabled())
                  Tr.debug(tc, "resolve : binding : " + refJndiName +
                               " -> " + boundToJndiName + " : type = " + beanInterfaceName);
  
              ref = ivIndirectLookupFactory.createIndirectJndiLookup(refJndiName,
                                                                     boundToJndiName,
                                                                     beanInterfaceName);
              binding.setObjects(null, ref); // F48603.4
  
              // Save the binding and IndirectLookupFactory.  If the binding name is
              // later found to be ambiguous, we can try to disambiguate by
              // appending the interface name.
              ejbBinding.ivBoundToJndiName = boundToJndiName;
              ejbBinding.ivIndirectLookupFactory = ivIndirectLookupFactory;
  
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "resolve", binding);
              return;
          }
  
          // -----------------------------------------------------------------------
          // Second, no binding, so this ejb ref will be resolved either through
          // ejblink/beanName or auto-link. Process the ref data and bind an
          // EJBLinkObjectFactory Reference.
          // -----------------------------------------------------------------------
  
          if (ejbBinding.getInjectionScope() == InjectionScope.GLOBAL) // d696076
          {
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "resolve: missing binding");
  
              super.ivMissingBindings.add(refJndiName);
              return;
          }
  
          if (ejbBinding.ivBeanInterface ||
              ejbBinding.ivHomeInterface) // F743-32443
          {
              String beanInterfaceName;
              String homeInterfaceName;
  
              if (ejbBinding.ivHomeInterface)
              {
                  beanInterfaceName = null;
                  homeInterfaceName = interfaceName;
              }
              else
              {
                  beanInterfaceName = interfaceName != null ? interfaceName : "java.lang.Object"; // d668376
                  homeInterfaceName = null;
              }
  
              // Use the EJBLink Reference factory (which may be overridden) to
              // create the Reference object that will be bound into Naming and
              // to resolve the object to inject.                           d440604.2
              J2EEName j2eeName = ivNameSpaceConfig.getJ2EEName();
              ref = ivEJBLinkRefFactory.createEJBLinkReference
                              (refJndiName, // d655264.1
                               j2eeName.getApplication(),
                               j2eeName.getModule(),
                               j2eeName.getComponent(),
                               ejbBinding.ivBeanName,
                               beanInterfaceName,
                               homeInterfaceName,
                               ejbBinding.ivEjbLocalRef,
                               ejbBinding.ivEjbRef);
  
              /**
               * If the injection type is specified and we have no class loader, we
               * were unable to check OverrideReferenceFactory. Wrap the reference
               * just created in another reference that will check the override
               * factories when looked up.
               */
              if (ivOverrideReferenceFactories != null &&
                  interfaceName != null && ejbBinding.ivClassLoader == null)
              {
                  throw new UnsupportedOperationException();
              }
  
              binding.setObjects(null, ref);
          }
          else
          {
              // This may occur if the customer has incorrectly coded either no
              // home or interface class, or the class names were coded incorrectly
              // and do not exist / cannot be loaded.                         d448539
  
              Tr.error(tc, "EJB_REF_OR_EJB_LOCAL_REF_IS_NOT_SPECIFIED_CORRECTLY_CWNEN0026E", refJndiName);
              throw new InjectionConfigurationException("The " + refJndiName + " Enterprise JavaBean (EJB) home and " +
                                                        "remote or local-home and local elements are either missing " +
                                                        "or could not be resolved");
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "resolve", binding);
      }