docs: public void merge(EnvEntry envEntry) throws InjectionException
      {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "merge : " + envEntry);
  
          ResourceImpl curAnnotation = (ResourceImpl) this.getAnnotation();
          String jndiName = envEntry.getName();
          String curJndiName = curAnnotation.name();
          String mappedName = envEntry.getMappedName();
          String curMappedName = curAnnotation.mappedName();
          String value = envEntry.getValue();
          String curValue = ivEnvValue; // F743-22218.3
          Object type = getEnvEntryType(envEntry); // F743-32443
          String lookup = envEntry.getLookupName(); // F743-21028.4
          if (lookup != null) {
              lookup = lookup.trim();
          }
  
          if (isTraceOn && tc.isDebugEnabled()) {
              Tr.debug(tc, "new=" + jndiName + ":" + mappedName + ":" + value + ":" + type + ":" + lookup);
              Tr.debug(tc, "cur=" + curJndiName + ":" + curMappedName + ":" + curValue + ":" + 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",
                           "env-entry",
                           "env-entry-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 " + "env-entry" +
                                 " elements with the same " + "env-entry-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;
          }
  
          //The type parameter is "optional"
          if (curAnnotation.ivIsSetType && envEntry.getTypeName() != null)
          {
              // check that value from xml is a subclasss, if not throw an error
              if (!isEnvEntryTypeCompatible(type)) // F743-32443
              {
                  Class<?> curType = getInjectionClassType();
                  Tr.error(tc, "CONFLICTING_XML_VALUES_CWNEN0052E",
                           ivComponent,
                           ivModule,
                           ivApplication,
                           "env-entry-type",
                           "env-entry",
                           "env-entry-name",
                           getJndiName(),
                           curType,
                           type); // d479669
                  String exMsg = "The " + ivComponent + " bean in the " +
                                 ivModule + " module of the " + ivApplication +
                                 " application has conflicting configuration data in the XML" +
                                 " deployment descriptor. Conflicting " + "env-entry-type" +
                                 " element values exist for multiple " + "env-entry" +
                                 " elements with the same " + "env-entry-name" + " element value : " +
                                 getJndiName() + ". The conflicting " + "env-entry-type" +
                                 " element values are " + curType + " and " +
                                 type + "."; // d479669
                  throw new InjectionConfigurationException(exMsg);
              }
          }
          else if (type != null && !curAnnotation.ivIsSetType)
          {
              setEnvEntryType(curAnnotation, type);
          }
  
          if (curValue != null && value != null)
          {
              if (!curValue.equals(value))
              {
                  Tr.error(tc, "CONFLICTING_XML_VALUES_CWNEN0052E",
                           ivComponent,
                           ivModule,
                           ivApplication,
                           "env-entry-value",
                           "env-entry",
                           "env-entry-name",
                           getJndiName(),
                           curValue,
                           value); // d479669
                  String exMsg = "The " + ivComponent + " bean in the " +
                                 ivModule + " module of the " + ivApplication +
                                 " application has conflicting configuration data in the XML" +
                                 " deployment descriptor. Conflicting " + "env-entry-value" +
                                 " element values exist for multiple " + "env-entry" +
                                 " elements with the same " + "env-entry-name" + " element value : " +
                                 getJndiName() + ". The conflicting " + "env-entry-value" +
                                 " element values are " + curValue + " and " +
                                 value + "."; // d479669
                  throw new InjectionConfigurationException(exMsg);
              }
          }
          else if (value != null)
          {
              ivEnvValue = value; // F743-22218.3
              if (isTraceOn && tc.isDebugEnabled())
                  Tr.debug(tc, "env-value = " + ivEnvValue);
          }
  
          // -----------------------------------------------------------------------
          // 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 an env-entry 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",
                               "env-entry",
                               "env-entry-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 " + "env-entry" +
                                     " elements with the same " + "env-entry-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);
              }
          }
  
          // It is an error to specify both 'env-entry-value' and 'lookup-name'. F743-22218.3
          if (ivEnvValue != null && ivLookup != null)
          {
              // Error - conflicting env-entry-value/lookup-name values
              String elementType = "env-entry";
              Tr.error(tc, "CONFLICTING_XML_VALUES_CWNEN0052E",
                       ivComponent,
                       ivModule,
                       ivApplication,
                       "env-entry-value/lookup-name",
                       elementType,
                       "env-entry-name",
                       getJndiName(),
                       ivEnvValue,
                       ivLookup);
              String exMsg = "The " + ivComponent + " bean in the " + ivModule +
                             " module of the " + ivApplication + " application" +
                             " has conflicting configuration data in the XML" +
                             " deployment descriptor. Conflicting " +
                             "env-entry-value/lookup-name" + " element values exist for" +
                             " multiple " + elementType + " elements with the same " +
                             "env-entry-name" + " element value : " + getJndiName() +
                             ". The conflicting " + "env-entry-value/lookup-name" +
                             " element values are \"" + ivEnvValue + "\" and \"" +
                             ivLookup + "\".";
              throw new InjectionConfigurationException(exMsg);
          }
  
          //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 = envEntry.getInjectionTargets();
          String targetName = null;
          String targetClassName = null;
  
          Class<?> injectionType = this.getInjectionClassType();
          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);
      }