docs: @Override
      public void enlist() throws ResourceException {
  
          final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();
  
          if (isTracingEnabled && tc.isEntryEnabled())
              Tr.entry(this, tc, "enlist", mcWrapper.getUOWCoordinator());
  
          if (this.hasRollbackOccured) {
              ResourceException x = new ResourceException("Attempt to continue working after transaction rolledback !");
              if (isTracingEnabled && tc.isEntryEnabled())
                  Tr.exit(tc, "enlist", "It is NOT valid to continue working under a transaction that has already rolledback");
              throw x;
          }
          if (enlisted == true) {
  
              if (isTracingEnabled && tc.isEntryEnabled()) {
                  Tr.exit(this, tc, "enlist", "already enlisted");
              }
  
              return; // Already enlisted, no-op.
  
          }
  
          try {
              int branchCoupling = mcWrapper.getCm().getResourceRefInfo().getBranchCoupling();
              int startFlag = XAResource.TMNOFLAGS;
              if (branchCoupling != ResourceRefInfo.BRANCH_COUPLING_UNSET) {
                  startFlag = mcWrapper.getCm().supportsBranchCoupling(branchCoupling, mcWrapper.get_managedConnectionFactory());
                  if (startFlag == -1)
                      throw new ResourceException("Branch coupling attribute not implemented for this resource");
              }
              int recoveryToken = mcWrapper.getRecoveryToken();
              EmbeddableWebSphereTransactionManager tranMgr = mcWrapper.pm.connectorSvc.transactionManager;
              if (tranMgr.enlist(mcWrapper.getUOWCoordinator(), this, recoveryToken, startFlag) != true) {
                  Tr.error(tc, "BAD_RETURN_VALUE_FROM_ENLIST_J2CA0087", this, mcWrapper.gConfigProps.cfName);
                  ResourceException x = new ResourceException("Error on enlist");
                  if (isTracingEnabled && tc.isEntryEnabled())
                      Tr.exit(this, tc, "enlist", x);
                  throw x;
              }
          } catch (ResourceException e) {
              com.ibm.ws.ffdc.FFDCFilter.processException(
                                                          e,
                                                          "com.ibm.ejs.j2c.XATransactionWrapper.enlist",
                                                          "535",
                                                          this);
  
              Tr.error(tc, "ENLIST_RESOURCE_EXCP_J2CA0030", "enlist", e, "ResourceException", mcWrapper.gConfigProps.cfName);
  
              mcWrapper.markTransactionError();
              try {
                  EmbeddableWebSphereTransactionManager tranMgr = mcWrapper.pm.connectorSvc.transactionManager;
                  tranMgr.getTransaction().setRollbackOnly();
              } catch (Exception ex) {
  
                  com.ibm.ws.ffdc.FFDCFilter.processException(ex, "com.ibm.ejs.j2c.XATransactionWrapper.enlist",
                                                              "630", this);
                  if (isTracingEnabled && tc.isEventEnabled()) {
                      Tr.event(this, tc, "Caught Exception while trying to mark transaction RollbackOnly - Exception:" + ex);
                  }
  
              }
  
              if (isTracingEnabled && tc.isEntryEnabled())
                  Tr.exit(this, tc, "enlist", e);
              throw e;
          } catch (Exception e) {
  
              com.ibm.ws.ffdc.FFDCFilter.processException(
                                                          e,
                                                          "com.ibm.ejs.j2c.XATransactionWrapper.enlist",
                                                          "546",
                                                          this);
  
              String pmiName = null;
              if (mcWrapper != null) {
                  pmiName = mcWrapper.gConfigProps.cfName;
              }
              Object[] parms = new Object[] { "enlist", e, "ResourceException", pmiName };
              Tr.error(tc, "ENLIST_RESOURCE_EXCP_J2CA0030", parms);
  
              mcWrapper.markTransactionError();
              try {
                  EmbeddableWebSphereTransactionManager tranMgr = mcWrapper.pm.connectorSvc.transactionManager;
                  tranMgr.getTransaction().setRollbackOnly();
              } catch (Exception ex) {
                  com.ibm.ws.ffdc.FFDCFilter.processException(ex, "com.ibm.ejs.j2c.XATransactionWrapper.enlist",
                                                              "663", this);
                  if (isTracingEnabled && tc.isEventEnabled()) {
                      Tr.event(this, tc, "Caught Exception while trying to mark transaction RollbackOnly - Exception:" + ex);
                  }
  
              }
  
              ResourceException re = new ResourceException("enlist: caught Exception");
              re.initCause(e);
              if (isTracingEnabled && tc.isEntryEnabled())
                  Tr.exit(this, tc, "enlist", e);
              throw re;
  
          }
  
          enlisted = true;
  
          if (isTracingEnabled && tc.isEntryEnabled())
              Tr.exit(this, tc, "enlist");
      }