code: void connect(JsMessagingEngine[] MEList, String targetType, String targetSignificance, String target,
                   boolean isPreferred) throws ResourceException
      {
          final String methodName = "connect";
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
          {
              SibTr.entry(this, TRACE, methodName, new Object[] { MEList, targetType, targetSignificance, target, isPreferred });
          }
  
          // TRM will decide if we have to connect to local or remote ME we needn't do a check
          connectUsingTrm(targetType, targetSignificance, target, isPreferred);
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
          {
              SibTr.exit(TRACE, methodName);
          }
      }
docs: Attempts to connect to an ME. Attempts will be made to the supplied ME list if the
  list is not empty (these are local MEs). If the list is empty then TRM will be called
  to attempt to get a connection.
  
  @param MEList A list of local MEs that match the target data. Having no target data means
  that all MEs will match for point to point and non durable pub sub and no messaging
  engines will match for durable pub sub
  @param targetType Whether the target is an ME or BusMember
  @param targetSignificance Whether the target significance is required or preferred
  @param target The target itself
  @param isPreferred Whether we are attempting to connect to a preferred ME. This will
  be true for the first attempts, but if target significance is set to preferred and no
  connection was made to a preferred ME then this method will be called again to locaet
  any ME but this time isPreferred will be set to false.
  @throws ResourceException