docs: public void merge(ResourceRef resourceRef) throws InjectionException
      {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "merge", resourceRef);
  
          ResourceImpl curAnnotation = (ResourceImpl) this.getAnnotation();
          String jndiName = resourceRef.getName();
          String curJndiName = curAnnotation.name();
          String mappedName = resourceRef.getMappedName();
          String curMappedName = curAnnotation.mappedName();
          String typeName = resourceRef.getType();
          boolean curShareable = curAnnotation.shareable();
          int resAuthType = resourceRef.getAuthValue();
          int resSharingScope = resourceRef.getSharingScopeValue();
          boolean shareable = resSharingScope == ResourceRef.SHARING_SCOPE_SHAREABLE;
  
          AuthenticationType authenticationType =
                          ResourceProcessor.convertAuthToEnum(resAuthType); // d543514
          AuthenticationType curAuthenticationType = curAnnotation.authenticationType();
          String lookup = resourceRef.getLookupName(); // F743-21028.4
          if (lookup != null) {
              lookup = lookup.trim();
          }
  
          if (isTraceOn && tc.isDebugEnabled())
              Tr.debug(tc, "new=" + jndiName + ":" + mappedName + ":" + authenticationType + ":" + shareable + ":" + typeName + ":" + lookup);
  
          if (isTraceOn && tc.isDebugEnabled())
              Tr.debug(tc, "cur=" + curJndiName + ":" + curMappedName + ":" + curAuthenticationType + ":" + curShareable + ":" + getInjectionClassTypeName() + ":" + ivLookup);
  
          //The mappedName parameter is "optional"
          if (curAnnotation.ivIsSetMappedName && mappedName != null)
          {
              if (!curMappedName.equals(mappedName))
              {
                  Tr.error(tc, "CONFLICTING_XML_VALUES_CWNEN0052E",
                           ivComponent,
                           ivModule,
                           ivApplication,
                           "mapped-name",
                           "resource-ref",
                           "res-ref-name",
                           getJndiName(),
                           curMappedName,
                           mappedName); // d479669
                  String exMsg = "The " + ivComponent + " bean in the " +
                                 ivModule + " module of the " + ivApplication +
                                 " application has conflicting configuration data in the XML" +
                                 " deployment descriptor. Conflicting " + "mapped-name" +
                                 " element values exist for multiple " + "resource-ref" +
                                 " elements with the same " + "res-ref-name" +
                                 " element value : " +
                                 getJndiName() + ". The conflicting " + "mapped-name" +
                                 " element values are " + curMappedName + " and " +
                                 mappedName + "."; // d479669
                  throw new InjectionConfigurationException(exMsg);
              }
          }
          else if (mappedName != null && !curAnnotation.ivIsSetMappedName)
          {
              curAnnotation.ivMappedName = mappedName;
              curAnnotation.ivIsSetMappedName = true;
          }
  
          setXMLType(typeName,
                     "resource-ref",
                     "res-ref-name",
                     "res-type"); // F743-32443
  
          //The authenticationType parameter is "optional".
          if (curAnnotation.ivIsSetAuthenticationType && resAuthType != ResourceRef.AUTH_UNSPECIFIED)
          {
              if (!(curAnnotation.authenticationType() == authenticationType))
              {
                  Tr.error(tc, "CONFLICTING_XML_VALUES_CWNEN0052E",
                           ivComponent,
                           ivModule,
                           ivApplication,
                           "res-auth",
                           "resource-ref",
                           "res-ref-name",
                           getJndiName(),
                           curAnnotation.authenticationType(),
                           authenticationType); // d479669
                  String exMsg = "The " + ivComponent + " bean in the " +
                                 ivModule + " module of the " + ivApplication +
                                 " application has conflicting configuration data in the XML" +
                                 " deployment descriptor. Conflicting " + "res-auth" +
                                 " element values exist for multiple " + "resource-ref" +
                                 " elements with the same " + "res-ref-name" + " element value : " +
                                 getJndiName() + ". The conflicting " + "res-auth" +
                                 " element values are " + curAnnotation.authenticationType() +
                                 " and " + authenticationType + "."; // d479669
                  throw new InjectionConfigurationException(exMsg);
              }
          }
          else if (resAuthType != ResourceRef.AUTH_UNSPECIFIED && !curAnnotation.ivIsSetAuthenticationType)
          {
              curAnnotation.ivAuthenticationType = authenticationType; // d543514
              curAnnotation.ivIsSetAuthenticationType = true;
          }
  
          //The resSharingScope parameter is "optional".
          if (curAnnotation.ivIsSetShareable && resSharingScope != ResourceRef.SHARING_SCOPE_UNSPECIFIED)
          {
              if (!(curAnnotation.shareable() == shareable))
              {
                  Tr.error(tc, "CONFLICTING_XML_VALUES_CWNEN0052E",
                           ivComponent,
                           ivModule,
                           ivApplication,
                           "res-sharing-scope",
                           "resource-ref",
                           "res-ref-name",
                           getJndiName(),
                           curAnnotation.shareable(),
                           shareable); // d479669
                  String exMsg = "The " + ivComponent + " bean in the " +
                                 ivModule + " module of the " + ivApplication +
                                 " application has conflicting configuration data in the XML" +
                                 " deployment descriptor. Conflicting " + "res-sharing-scope" +
                                 " element values exist for multiple " + "resource-ref" +
                                 " elements with the same " + "res-ref-name" + " element value : " +
                                 getJndiName() + ". The conflicting " + "res-sharing-scope" +
                                 " element values are " + curAnnotation.shareable() +
                                 " and " + shareable + "."; // d479669
                  throw new InjectionConfigurationException(exMsg);
              }
          }
          else if (resSharingScope != ResourceRef.SHARING_SCOPE_UNSPECIFIED && !curAnnotation.ivIsSetShareable)
          {
              curAnnotation.ivShareable = shareable;
              curAnnotation.ivIsSetShareable = true;
          }
  
          // -----------------------------------------------------------------------
          // Merge : lookup - "optional parameter                       F743-21028.4
          //
          // If present in XML, even if the empty string (""), it will override
          // any setting via annotations. An empty string would effectivly turn
          // off this setting.
          //
          // When a message-destination-ref appears multiple times in XML, an empty
          // string is considered to be a confilct with a non-empty string, since
          // both were explicitly specified.
          // -----------------------------------------------------------------------
          if (lookup != null)
          {
              if (ivLookupInXml)
              {
                  if (!lookup.equals(ivLookup))
                  {
                      Tr.error(tc, "CONFLICTING_XML_VALUES_CWNEN0052E",
                               ivComponent,
                               ivModule,
                               ivApplication,
                               "lookup-name",
                               "resource-ref",
                               "res-ref-name",
                               jndiName,
                               ivLookup,
                               lookup);
                      String exMsg = "The " + ivComponent + " bean in the " +
                                     ivModule + " module of the " + ivApplication +
                                     " application has conflicting configuration data in the XML" +
                                     " deployment descriptor. Conflicting " + "lookup-name" +
                                     " element values exist for multiple " +
                                     "resource-ref" + " elements with the same " +
                                     "res-ref-name" +
                                     " element value : " + jndiName + ". The conflicting " +
                                     "lookup-name" + " element values are \"" + ivLookup +
                                     "\" and \"" + lookup + "\".";
                      throw new InjectionConfigurationException(exMsg);
                  }
              }
              else
              {
                  ivLookup = lookup;
                  ivLookupInXml = true;
                  curAnnotation.ivLookup = lookup;
                  if (isTraceOn && tc.isDebugEnabled())
                      Tr.debug(tc, "ivLookup = " + ivLookup);
              }
          }
  
          //Loop through the InjectionTargets and call addInjectionTarget.... which
          //already accounts for duplicates (in case they duplicated some between the two ref definitions.
          List<InjectionTarget> targets = resourceRef.getInjectionTargets();
          String targetName = null;
          String targetClassName = null;
  
          Class<?> injectionType = loadClass(resourceRef.getType());
          if (isTraceOn && tc.isDebugEnabled())
              Tr.debug(tc, "targetType : " + injectionType);
  
          if (!targets.isEmpty())
          {
              for (InjectionTarget target : targets)
              {
                  targetClassName = target.getInjectionTargetClassName();
                  targetName = target.getInjectionTargetName();
                  this.addInjectionTarget(injectionType, targetName, targetClassName);
              } //for loop
          } //targets !null
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "merge", this);
      }