code: protected void threadBegin() {
          //
          // Note the 'beforeCallbacks' 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 IJobExecutionStartCallbackService,
          // 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 "before" processing.
          try {
              tranMgr.setTransactionTimeout(0);
              if (beforeCallbacks != null) {
                  for (IJobExecutionStartCallbackService callback : beforeCallbacks) {
                      if (logger.isLoggable(Level.FINER)) {
                          logger.logp(Level.FINER, CLASSNAME, "threadBegin", "Calling before callback", callback);
                      }
                      callback.jobStarted(runtimeWorkUnitExecution);
                  }
              }
          } catch (Throwable t) {
              // Fail the execution if any of our before-work-unit callbacks failed. E.g. the joblog context setup
              // was unsuccessful. We may want to make it an option whether or not to fail here in the future.
              runtimeWorkUnitExecution.logExecutionFailedMessage();
              throw new BatchContainerRuntimeException("An error occurred during thread initialization.", t);
          }
      }
docs: All the beginning of thread processing.
  
  Note we are going to fail fast out of here and fail the execution upon experiencing any exception.