docs: @Override
      public boolean addSync() throws ResourceException {
  
          if (tc.isEntryEnabled()) {
              Tr.entry(this, tc, "addSync");
          }
  
          try {
  
              UOWCoordinator uowCoord = mcWrapper.getUOWCoordinator();
              if (uowCoord != null) {
                  if (uowCoord.isGlobal()) {
                      if (mcWrapper.isConnectionSynchronizationProvider()) {
                          throw new UnsupportedOperationException("com.ibm.ws.Transaction.SynchronizationProvider");
                          /*
                           * Use the Synchronization object from the managed connection to
                           * register.
                           */
                          //Synchronization s = ((SynchronizationProvider)mcWrapper.getManagedConnection()).getSynchronization();
                          //LocationSpecificFunction.instance.getTransactionManager().registerSynchronization(uowCoord, s, EmbeddableWebSphereTransactionManager.SYNC_TIER_INNER);
                      }
                      /*
                       * This code will remain here just in case we run into this
                       * case. We should not be isEnlistmentDisabled in this code.
                       *
                       * Log a message and return, if isEnlistmentDisabled is true.
                       */
                      if (mcWrapper.isEnlistmentDisabled()) {
                          if (tc.isDebugEnabled()) {
                              Tr.debug(this, tc, "Managed connection isEnlistmentDisabled is true.");
                              Tr.debug(this, tc, "Returning without registering.");
                          }
                          if (tc.isEntryEnabled()) {
                              Tr.exit(this, tc, "addSync", false);
                          }
                          return false;
                      }
                      /*
                       * Use our XATransactionWrapper
                       */
                      // Global Transaction
                      EmbeddableWebSphereTransactionManager tranMgr = mcWrapper.pm.connectorSvc.transactionManager;
                      tranMgr.registerSynchronization(uowCoord, this);
                      mcWrapper.markLocalTransactionWrapperInUse();
                      registeredForSync = true;
                  } else {
                      // Local Transaction
                      // No need to register for synchronization for unshared/LTC/res-control=Application.
                      //  Instead of cleanup being done via after completion it will either happen at close or
                      //  commit/rollback which ever happens last.  This will allow the connection to be returned
                      //  to the pool prior to the end of the LTC scope allowing better utilization of the connection.
                      boolean shareable = mcWrapper.getConnectionManager().shareable();
                      if (!shareable && !J2CUtilityClass.isContainerAtBoundary(mcWrapper.pm.connectorSvc.transactionManager)) {
                          // Register an instance of an RRS no-transaction wrapper
                          // so the TM will create an RRS NativeLocalTranasction.  The wrapper
                          // provides "empty" TransactioWrapper and Synchronization behaviors,
                          // but indicates to the TM that the LTC requires RRS support.
  
                          //if (tc.isEntryEnabled()) {
                          //  Tr.exit(this, tc, "addSync: returning without registering.");
                          //}
                          //return false;
                          if (this.isRRSTransactional()) {
                              ((SynchronizationRegistryUOWScope) uowCoord).registerInterposedSynchronization(
                                                                                                             new RRSNoTransactionWrapper());
                          } else {
                              if (tc.isEntryEnabled()) {
                                  Tr.exit(this, tc, "addSync", "returning without registering");
                              }
                              return false;
                          }
                      } else {
  
                          if (mcWrapper.isConnectionSynchronizationProvider()) {
                              throw new UnsupportedOperationException("com.ibm.ws.Transaction.SynchronizationProvider");
                              /*
                               * Use the Synchronization object from the managed connection to
                               * register.
                               */
                              //Synchronization s = ((SynchronizationProvider)mcWrapper.getManagedConnection()).getSynchronization();
                              //((SynchronizationRegistryUOWScope) uowCoord).registerInterposedSynchronization(s);
                              //registeredForSync = false;
                          } else {
  
                              /*
                               * In order
                               * to take advantage of the new level of code in which MCWrapper has the isEnlistmentDisabled()
                               */
                              if (mcWrapper.isEnlistmentDisabled()) {
                                  if (tc.isDebugEnabled()) {
                                      Tr.debug(this, tc, "Managed connection isEnlistmentDisabled is true.");
                                      Tr.debug(this, tc, "Returning without registering.");
                                  }
                                  if (tc.isEntryEnabled()) {
                                      Tr.exit(this, tc, "addSync", false);
                                  }
                                  return false;
                              }
                              ((SynchronizationRegistryUOWScope) uowCoord).registerInterposedSynchronization(this);
                              mcWrapper.markLocalTransactionWrapperInUse();
                              registeredForSync = true;
                          }
  
                      }
                  }
              } else {
                  // No transaction context.  Should never happen.
                  Tr.error(tc, "NO_VALID_TRANSACTION_CONTEXT_J2CA0040", "addSync", null, mcWrapper.gConfigProps.cfName);
                  throw new ResourceException("INTERNAL ERROR: No valid transaction context present");
              }
  
          } catch (ResourceException e) {
              com.ibm.ws.ffdc.FFDCFilter.processException(
                                                          e,
                                                          "com.ibm.ejs.j2c.LocalTransactionWrapper.addSync",
                                                          "594",
                                                          this);
              Tr.error(tc, "REGISTER_WITH_SYNCHRONIZATION_EXCP_J2CA0026", "addSync", e, "Exception");
              throw e;
          } catch (Exception e) {
              com.ibm.ws.ffdc.FFDCFilter.processException(
                                                          e,
                                                          "com.ibm.ejs.j2c.LocalTransactionWrapper.addSync",
                                                          "605",
                                                          this);
              Tr.error(tc, "REGISTER_WITH_SYNCHRONIZATION_EXCP_J2CA0026", "addSync", e, "Exception");
              ResourceException re = new ResourceException("addSync: caught Exception");
              re.initCause(e);
              throw re;
          }
          if (tc.isEntryEnabled()) {
              Tr.exit(this, tc, "addSync", registeredForSync);
          }
  
          return registeredForSync;
  
      }