docs: private RaConnector mergeConnectors(RaConnector rxConnector, RaConnector annoConnector) {
          final boolean trace = TraceComponent.isAnyTracingEnabled();
  
          RaResourceAdapter rxRa = rxConnector.getResourceAdapter();
  
          boolean useRxOra = false;
          RaOutboundResourceAdapter rxOra = null;
          if (rxRa.getOutboundResourceAdapter() != null) {
              useRxOra = true;
              rxOra = rxRa.getOutboundResourceAdapter();
          }
  
          boolean useAnno = false;
          RaResourceAdapter annoRa = null;
          boolean useAnnoOra = false;
          RaOutboundResourceAdapter annoOra = null;
          if (annoConnector != null) {
              useAnno = true;
              annoRa = annoConnector.getResourceAdapter();
              if (annoRa.getOutboundResourceAdapter() != null) {
                  useAnnoOra = true;
                  annoOra = annoConnector.getResourceAdapter().getOutboundResourceAdapter();
              }
          }
  
          RaConnector connector = new RaConnector();
          RaResourceAdapter ra = new RaResourceAdapter();
          connector.setResourceAdapter(ra);
          RaOutboundResourceAdapter ora = new RaOutboundResourceAdapter();
  
          if (rxRa.getResourceAdapterClass() != null) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "rar.xml resource adapter class", rxRa.getResourceAdapterClass());
              connector.getResourceAdapter().setResourceAdapterClass(rxRa.getResourceAdapterClass());
          } else if (useAnno) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "annotated resource adapter class", annoRa.getResourceAdapterClass());
              // No need to check if there is a resource adapter class since this will be set to the annotated classname
              connector.getResourceAdapter().setResourceAdapterClass(annoRa.getResourceAdapterClass());
          }
  
          if (!rxConnector.getDescription().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "rar.xml description", rxConnector.getDescription());
              connector.setDescription(rxConnector.getDescription());
          }
          else if (useAnno && !annoConnector.getDescription().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "@Connector description", annoConnector.getDescription());
              connector.setDescription(annoConnector.getDescription());
          }
  
          if (!rxConnector.getDisplayName().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "rar.xml display name", rxConnector.getDisplayName());
              connector.setDisplayName(rxConnector.getDisplayName());
          }
          else if (useAnno && !annoConnector.getDisplayName().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "@Connector display name", annoConnector.getDisplayName());
              connector.setDisplayName(annoConnector.getDisplayName());
          }
  
          if (rxConnector.getResourceAdapterVersion() != null) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "rar.xml resource adapter version", rxConnector.getResourceAdapterVersion());
              connector.setResourceAdapterVersion(rxConnector.getResourceAdapterVersion());
          }
          else if (useAnno && annoConnector.getResourceAdapterVersion() != null) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "@Connector resource adapter version", annoConnector.getResourceAdapterVersion());
              connector.setResourceAdapterVersion(annoConnector.getResourceAdapterVersion());
          }
  
          // security permissions must be copied.  It's not used but an Info
          // message will be logged that this is not supported
          if (!rxRa.getSecurityPermissions().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "rar.xml resource adapter security permissions", rxRa.getSecurityPermissions());
              connector.getResourceAdapter().setSecurityPermissions(rxRa.getSecurityPermissions());
          }
          else if (useAnno && !annoRa.getSecurityPermissions().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "@Connector resource adapter security permissions", annoRa.getSecurityPermissions());
              connector.getResourceAdapter().setSecurityPermissions(annoRa.getSecurityPermissions());
          }
  
          // Set outbound resource adapter properties
          boolean setRaOra = false;
          if (useRxOra && rxOra.getTransactionSupport() != null) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "rar.xml transaction support", rxOra.getTransactionSupport());
              setRaOra = true;
              ora.setTransactionSupport(rxOra.getTransactionSupport());
          } else if (useAnnoOra && annoOra.getTransactionSupport() != null) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "@Connector transaction support", annoOra.getTransactionSupport());
              setRaOra = true;
              ora.setTransactionSupport(annoOra.getTransactionSupport());
          }
  
          // Getting authenticationMechanisms since it's not added to the metatype but it is
          // needed to enforce this:
          //   JCA 1.6 spec schema definition
          //   If any of the outbound resource adapter elements (transaction-support,
          //   authentication-mechanism, reauthentication-support) is specified through
          //   this element or metadata annotations, and no connection-definition is
          //   specified as part of this element or through annotations, the
          //   application server must consider this an error and fail deployment.
          if (useRxOra && !rxOra.getAuthenticationMechanisms().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "rar.xml authentication mechanisms", rxOra.getAuthenticationMechanisms());
              setRaOra = true;
              ora.setAuthenticationMechanisms(rxOra.getAuthenticationMechanisms());
          } else if (useAnnoOra && !annoOra.getAuthenticationMechanisms().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "@Connector authentication mechanisms", annoOra.getAuthenticationMechanisms());
              setRaOra = true;
              ora.setAuthenticationMechanisms(annoOra.getAuthenticationMechanisms());
          }
  
          if (useRxOra && rxOra.getReauthenticationSupport() != null) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "rar.xml reauthentication support", rxOra.getReauthenticationSupport());
              setRaOra = true;
              ora.setReauthenticationSupport(rxOra.getReauthenticationSupport());
          } else if (useAnnoOra && annoOra.getReauthenticationSupport() != null) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "@Connector reauthentication support", annoOra.getReauthenticationSupport());
              setRaOra = true;
              ora.setReauthenticationSupport(annoOra.getReauthenticationSupport());
          }
  
          if (setRaOra)
              ra.setOutboundResourceAdapter(ora);
  
          if (!rxConnector.getRequiredWorkContext().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "rar.xml required work context", rxConnector.getRequiredWorkContext());
              if (useAnno && !annoConnector.getRequiredWorkContext().isEmpty()) {
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, "@Connector required work context", rxConnector.getRequiredWorkContext());
                  List<String> requiredWorkContexts = new ArrayList<String>(rxConnector.getRequiredWorkContext());
                  for (String requiredWorkContext : annoConnector.getRequiredWorkContext()) {
                      if (!rxConnector.getRequiredWorkContext().contains(requiredWorkContext)) {
                          requiredWorkContexts.add(requiredWorkContext);
                      }
                  }
                  connector.setRequiredWorkContext(requiredWorkContexts);
              } else {
                  connector.setRequiredWorkContext(rxConnector.getRequiredWorkContext());
              }
          } else if (useAnno && !annoConnector.getRequiredWorkContext().isEmpty()) {
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "@Connector required work context", annoConnector.getRequiredWorkContext());
              connector.setRequiredWorkContext(annoConnector.getRequiredWorkContext());
          }
  
          return connector;
      }