docs: private RaConnector processConnector(Class<?> connectorClass, RaConnector rxConnector) throws ResourceAdapterInternalException {
          final boolean trace = TraceComponent.isAnyTracingEnabled();
  
          RaConnector masterConnector = new RaConnector();
  
          // get the parsed ra.xml file ------------------------------------------
          RaResourceAdapter rxRA = rxConnector == null ? null : rxConnector.getResourceAdapter();
          if (trace && tc.isDebugEnabled()) {
              Tr.debug(this, tc, "rxRA", rxRA);
              if (rxRA != null)
                  Tr.debug(this, tc, "rxRA.getResourceAdapterClass", rxRA.getResourceAdapterClass());
          }
  
          // Create empty shell --------------------------------------------------
          RaResourceAdapter masterRA = null;
  
          // These will be set as needed
          RaOutboundResourceAdapter masterOutbound = null;
          RaInboundResourceAdapter masterInbound = new RaInboundResourceAdapter();
          RaMessageAdapter masterMessageAdapter = new RaMessageAdapter();
  
          // parse annotations ---------------------------------------------------
          // Convert all the info from the annotations to xml.Ra classes
          // This info will be merged with the ra.xml info, if any
          RaConnector annoConnector = null;
          List<RaConfigProperty> annoRAConfigProperties = new LinkedList<RaConfigProperty>();
          List<RaConnectionDefinition> annoDefinitions = new LinkedList<RaConnectionDefinition>();
          List<RaMessageListener> annoMsgListeners = new LinkedList<RaMessageListener>();
          List<RaAdminObject> annoAdminObjects = new LinkedList<RaAdminObject>();
  
          // At this point, at most one of the classes annotated with @Connector will match
          // the class specified in ra.xml, if any, OR there will be none or only one class that is annotated
          if (trace && tc.isDebugEnabled())
              Tr.debug(this, tc, "Number of classes annotated with @Connector is " + connectorClasses.size());
          if (!connectorClasses.isEmpty()) {
              for (Class<?> annoConnectorClass : connectorClasses) {
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, "annotated class is " + annoConnectorClass.getName());
                  if (connectorClass != null) {
                      if (connectorClass.getName().equals(annoConnectorClass.getName())) {
                          annoConnector = getAnnotatedConnector(annoConnectorClass);
                          if (trace && tc.isDebugEnabled()) {
                              Tr.debug(this, tc, "<resourceadapter-class> set to" + connectorClass.getName());
                          }
                          annoRAConfigProperties.addAll(getAnnotatedConfigProperties(annoConnectorClass, true));
                          break;
                      }
                  } else {
                      annoConnector = getAnnotatedConnector(annoConnectorClass);
                      annoRAConfigProperties.addAll(getAnnotatedConfigProperties(annoConnectorClass, true));
                  }
              }
          }
          if (connectorClass != null && !connectorClasses.contains(connectorClass)) {
              // what if there is no @Connector but the class mentioned in ra.xml is annotated with @ConfigProperty
              annoRAConfigProperties.addAll(getAnnotatedConfigProperties(connectorClass, true));
          }
  
          for (Class<?> connDefClass : connDefClasses)
              annoDefinitions.add(getAnnotatedConnectionDefinition(connDefClass));
          for (Class<?> connDefClass : connDefsClasses)
              annoDefinitions.addAll(getAnnotatedConnectionDefinitions(connDefClass));
  
          for (Class<?> activationClass : activationClasses)
              annoMsgListeners.addAll(getAnnotatedMessageListeners(activationClass));
  
          for (Class<?> aoClass : adminObjectClasses)
              annoAdminObjects.addAll(getAnnotatedAdminObjects(aoClass));
  
          // begin processing ----------------------------------------------------
          if (rxRA != null) {
              // need to process/merge ra.xml and annotations
              // -> BEGIN process connector XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "processing ra.xml resource adapter");
  
              masterConnector = mergeConnectors(rxConnector, annoConnector);
              // The resource adapter is created by mergeConnectors
              masterRA = masterConnector.getResourceAdapter();
  
              // The outbound connector may have been created as part of merging connectors
              if (masterRA.getOutboundResourceAdapter() != null) {
                  masterOutbound = masterRA.getOutboundResourceAdapter();
              } else {
                  masterOutbound = new RaOutboundResourceAdapter();
                  masterRA.setOutboundResourceAdapter(masterOutbound);
              }
              // -> END process connector XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  
              // -> BEGIN process RA config properties XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              for (RaConfigProperty p : rxRA.getConfigProperties()) {
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, "RA config property from xml: " + p);
              }
              masterRA.getConfigProperties().addAll(mergeConfigProperties(rxRA.getConfigProperties(), annoRAConfigProperties));
              // <- END process RA config properties XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  
              // -> BEGIN process outbound resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
              RaOutboundResourceAdapter rxOutbound = rxRA.getOutboundResourceAdapter();
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "processing outbound connection definitions", rxOutbound);
  
              if (rxOutbound != null) {
                  List<RaConnectionDefinition> rxDefinitions = rxOutbound.getConnectionDefinitions();
                  if (!rxDefinitions.isEmpty()) {
                      // merge ra.xml and annotated connection definitions
                      masterOutbound.getConnectionDefinitions().addAll(mergeConnectionDefinitions(rxDefinitions, annoDefinitions));
                  } else {
                      // there are no connection definitions in the ra.xml, so just
                      // add the annotated connection definitions to the master
                      masterOutbound.getConnectionDefinitions().addAll(annoDefinitions);
                  }
              } else {
                  // there is no ra.xml outbound element, so just add the annotated
                  // connection definitions to the master
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, "no ra.xml, masterOutbound: " + masterOutbound);
                  if (masterOutbound != null)
                      masterOutbound.getConnectionDefinitions().addAll(annoDefinitions);
              }
              // <- END process outbound resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
  
              // -> BEGIN process message listeners XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "processing inbound message listeners");
  
              RaInboundResourceAdapter rxInbound = rxRA.getInboundResourceAdapter();
              masterInbound.setMessageAdapter(masterMessageAdapter);
              masterRA.setInboundResourceAdapter(masterInbound);
              boolean messageListenersMerged = false;
              if (rxInbound != null && rxInbound.getMessageAdapter() != null) {
                  List<RaMessageListener> rxMsgListeners = rxInbound.getMessageAdapter().getMessageListeners();
                  if (!rxMsgListeners.isEmpty()) {
                      // merge ra.xml and annotated message listeners
                      masterMessageAdapter.getMessageListeners().addAll(mergeMessageListeners(rxMsgListeners, (LinkedList<RaMessageListener>) annoMsgListeners));
                      messageListenersMerged = true;
                  }
              }
              if (!messageListenersMerged) {
                  // there is no ra.xml message listeners, so just add the annotated
                  // message listeners to the master
                  masterMessageAdapter.getMessageListeners().addAll(annoMsgListeners);
              }
              // <- END process message listeners XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  
              // -> BEGIN process admin objects XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "processing resource adapter admin objects");
  
              List<RaAdminObject> rxAdminObjects = rxRA.getAdminObjects();
              if (!rxAdminObjects.isEmpty()) {
                  // merge ra.xml and annotated admin objects
                  masterRA.getAdminObjects().addAll(mergeAdminObjects(rxAdminObjects, annoAdminObjects));
              } else {
                  // there are no admin objects defined in ra.xml, so just add the annotated
                  // admin objects to the master
                  masterRA.getAdminObjects().addAll(annoAdminObjects);
              }
              // <- END process admin objects XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  
          } else {
              // There is no ra.xml resource adapter, therefore just copy the annotated
              // objects, if any, into the master
  
              // There should only be zero or only one class annotated with @Connector at this point
              if (trace && tc.isDebugEnabled()) {
                  Tr.debug(this, tc, "only annotations were found");
                  Tr.debug(this, tc, "number of @Connector annotations: " + connectorClasses.size());
              }
  
              // Create empty shell --------------------------------------------------
              masterRA = new RaResourceAdapter();
              masterConnector.setResourceAdapter(masterRA);
  
              // These will be set on the masterRA as needed
              masterOutbound = new RaOutboundResourceAdapter();
              masterInbound = new RaInboundResourceAdapter();
              masterMessageAdapter = new RaMessageAdapter();
  
              // -> BEGIN process resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
              // Set resource adapter class to the annotated class
              if (annoConnector != null) {
                  masterRA.setResourceAdapterClass(annoConnector.getResourceAdapter().getResourceAdapterClass());
  
                  if (annoConnector.getDescriptions() != null) {
                      masterConnector.setDescription(annoConnector.getDescription());
                  }
  
                  if (annoConnector.getDisplayName() != null) {
                      masterConnector.setDisplayName(annoConnector.getDisplayName());
                  }
  
                  if (annoConnector.getResourceAdapterVersion() != null) {
                      masterConnector.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 (annoConnector.getResourceAdapter().getSecurityPermissions() != null) {
                      masterConnector.getResourceAdapter().setSecurityPermissions(annoConnector.getResourceAdapter().getSecurityPermissions());
                  }
  
                  if (annoConnector.getRequiredWorkContext() != null)
                      masterConnector.setRequiredWorkContext(annoConnector.getRequiredWorkContext());
              }
  
              // copy annotated top level resource adapter config properties
              if (!annoRAConfigProperties.isEmpty())
                  masterRA.getConfigProperties().addAll(annoRAConfigProperties);
              // -> END process resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
  
              // -> BEGIN process outbound resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
              boolean outboundWasFound = false;
              // There should only be one class annotated with @Connector at this point
              if (annoConnector != null &&
                  annoConnector.getResourceAdapter().getOutboundResourceAdapter() != null) {
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, "transaction support from @Connector: " +
                                         annoConnector.getResourceAdapter().getOutboundResourceAdapter().getTransactionSupport());
                  if (annoConnector.getResourceAdapter().getOutboundResourceAdapter().getTransactionSupport() != null) {
                      masterOutbound.setTransactionSupport(annoConnector.getResourceAdapter().getOutboundResourceAdapter().getTransactionSupport());
                      outboundWasFound = true;
                  }
  
                  // 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 (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, "authentication mechanism from @Connector: " +
                                         annoConnector.getResourceAdapter().getOutboundResourceAdapter().getAuthenticationMechanisms());
                  if (!annoConnector.getResourceAdapter().getOutboundResourceAdapter().getAuthenticationMechanisms().isEmpty()) {
                      masterOutbound.setAuthenticationMechanisms(annoConnector.getResourceAdapter().getOutboundResourceAdapter().getAuthenticationMechanisms());
                      outboundWasFound = true;
                  }
  
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, "reauthentication support from @Connector: " +
                                         annoConnector.getResourceAdapter().getOutboundResourceAdapter().getReauthenticationSupport());
                  if (annoConnector.getResourceAdapter().getOutboundResourceAdapter().getReauthenticationSupport() != null) {
                      masterOutbound.setReauthenticationSupport(annoConnector.getResourceAdapter().getOutboundResourceAdapter().getReauthenticationSupport());
                      outboundWasFound = true;
                  }
              }
  
              // copy annotated connection definitions
              if (!annoDefinitions.isEmpty()) {
                  masterOutbound.getConnectionDefinitions().addAll(annoDefinitions);
                  outboundWasFound = true;
              }
  
              if (outboundWasFound)
                  masterRA.setOutboundResourceAdapter(masterOutbound);
              // <- END process outbound resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
  
              // <- BEGIN process inbound resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
              // copy annotated message listeners
              if (!annoMsgListeners.isEmpty()) {
                  masterMessageAdapter.getMessageListeners().addAll(annoMsgListeners);
                  if (masterRA.getInboundResourceAdapter() == null)
                      masterRA.setInboundResourceAdapter(masterInbound);
                  masterInbound.setMessageAdapter(masterMessageAdapter);
                  masterRA.setInboundResourceAdapter(masterInbound);
              }
              // <- END process inbound resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
  
              // <- BEGIN process rest of resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
              // copy annotated admin objects
              if (!annoAdminObjects.isEmpty())
                  masterRA.getAdminObjects().addAll(annoAdminObjects);
              // <- END process rest of resource adapter XXXXXXXXXXXXXXXXXXXXXXXXXX
          }
  
          return masterConnector;
      }