docs: @Override
      public void afterCompletion(int status) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { 
              Tr.entry(this, tc, "afterCompletion", status);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { 
              Tr.debug(this, tc, "Using transaction wrapper@" + Integer.toHexString(this.hashCode()));
          }
  
  
          // When afterCompletionCode is called we need to reset the registeredForSync flag.
          registeredForSync = false;
  
          /*
           * Mark the transaction complete in the wrapper
           */
  
          // Do NOT catch runtime exceptions here.  Let them flow out
          // of the component.
          mcWrapper.transactionComplete();
  
          // Check if any connection handles are still in use
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { 
              if (mcWrapper.getHandleCount() != 0) {
                  // Issue warning that Connections have not been closed by
                  // the end of the current UOW scope and will be closed
                  // by the CM.
                  //            Tr.warning(this, tc,"HANDLE_NOT_CLOSED_J2CA0055");
                  // removed null check on mcWrapper since it is redundant from the above code (mcWrapper.getUOWCoordinator())
                  String pmiName = mcWrapper.gConfigProps.cfName;
                  Tr.debug(this, tc, "Information:  handle not closed at end of UOW for resource " + pmiName);
              }
          }
  
          // Do NOT catch the runtime exception which getConnectionManager
          // might throw. If this is thrown it is an internal bug and needs
          // to be fixed. Allow the rte to flow up to the container.
          boolean shareable = mcWrapper.getConnectionManager().shareable();
  
          //
          // If the connection is shareable, or it is non-shareable and the
          // handleCount is zero, then release it back to the poolManger,
          // otherwise simply reset the transaction related variables.
          //
          // Note: shareable connections are released at the end of
          // transactions regardless of outstanding handles because we don't
          // support handled being associated to an active
          //  managedConnection outside of a sharing boundary.
          if ((shareable) || (!shareable && mcWrapper.getHandleCount() == 0)) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { 
                  Tr.debug(this, tc, "afterCompletionCode: Releasing the connection to the pool. Shareable = " + shareable);
              }
  
              try {
                  mcWrapper.releaseToPoolManager();
              } catch (Exception e) {
                  // Do not rethrow the exception here since the client has
                  // successfully completed the transaction.
                  // Log the error and go on.
  
                  // need to change the "291" number below
                  com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.RRSLocalTransactionWrapper.afterCompletion", "291", this);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { 
                      String pmiName = mcWrapper.gConfigProps.cfName;
                      Tr.debug(this, tc, "afterCompletionCode for resource " + pmiName + ":  caught Exception", e);
                  }
              }
  
          } // end ((shareable) || (!shareable && mcWrapper.getHandleCount() == 0))
          else {
              /*
               * The cleanup of the coordinator and enlisted flag should
               * only be done here for non sharable connections. In other cases,
               * the coord is set to null in mcWrapper.releaseToPoolManager().
               * We only need to worry about this here if the handleCount is
               * greater than 0 (in which case the cleanup will be done
               * by the poolManager). Same thing for the tranFailed flag in
               * the MCWrapper.
               */
              enlisted = false;
              //     mcWrapper.setTranFailed(false);
              mcWrapper.setUOWCoordinator(null);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(this, tc, "afterCompletion");
  
      }