code: protected void threadEnd() {
          //
          // Note the 'afterCallbacks' list is not going to have a well-defined order, so it is of limited use.
          // We probably want to revisit this with some kind of priority/order based on ranking to make
          // it more useful.
          //
          // At the moment we treat the setting of the tran timeout separately, rather than as a IJobExecutionEndCallbackService,
          // to reflect the fact that this is provided by a required dependency.  If we were to want this to function in SE mode,
          // say, we might want to factor this too as an "extension" that is provided by another layer, and so incorporate this into a
          // more generic, extensible "after" processing.
          try {
              getBatchKernel().workUnitCompleted(this);
          } catch (Exception e) {
              // FFDC instrumentation
          }
  
          if (afterCallbacks != null) {
              for (IJobExecutionEndCallbackService callback : afterCallbacks) {
                  try {
                      if (logger.isLoggable(Level.FINER)) {
                          logger.logp(Level.FINER, CLASSNAME, "threadEnd", "Calling after callback", callback);
                      }
                      callback.jobEnded(runtimeWorkUnitExecution);
                  } catch (Throwable t) {
                      // FFDC instrumentation
                  }
              }
          }
  
          try {
              tranMgr.setTransactionTimeout(0);
          } catch (SystemException e) {
              // FFDC instrumentation
          }
      }
docs: All the end of thread processing.
  
  Note we are going to try to catch and eat any exceptions thrown within this method.
  We really want to give as much chance as possible for each piece of cleanup to complete.