code: public static Object setJ2CThreadIdentity(Subject subject) throws ThreadIdentityException {
          LinkedHashMap<J2CIdentityService, Object> token = null;
          for (J2CIdentityService j2cIdentityService : j2cIdentityServices) {
              if (j2cIdentityService.isJ2CThreadIdentityEnabled()) {
                  try {
                      Object tokenReturnedFromSet = j2cIdentityService.set(subject);
                      if (tokenReturnedFromSet != null) {
                          if (token == null) {
                              token = new LinkedHashMap<J2CIdentityService, Object>();
                          }
                          token.put(j2cIdentityService, tokenReturnedFromSet);
                      }
                  } catch (Exception e) {
                      com.ibm.ws.ffdc.FFDCFilter.processException(e, thisClass, "272");
                      resetCheckedInternal(token, e);
                  }
              }
          }
          return token;
      }
docs: Set the subject's identity as the thread identity.
  
  This method is used by J2C callers. It checks whether J2C thread
  identity is enabled for the registered J2CIdentityService instance(s)
  before setting the identity.
  
  @return A token representing the identity previously on the thread.
  This token must be passed to the subsequent reset call.
  Returns null if thread identity support is disabled.
  @throws ThreadIdentityException