code: public String getCurrentSessionId() {
          String currentId = null;
          Hashtable ht = (Hashtable) currentThreadSacHashtable.get();
          if (ht != null) {
              SessionAffinityContext sac = (SessionAffinityContext) ht.get(_smc.getSessionAffinityContextKey());
              if (sac != null) {
                  currentId = _sam.getInUseSessionID(null, sac);
                  // Make sure this is set if nothing was passed in.
                  if (currentId == null) {
                      currentId = "NONE";
                  }
              }
          }
          // If null is returned, this is considered to be a user spawned thread.
          return currentId;
      }
docs: /*
  getCurrentSessionId
  Used to get the session id to use for crossover checking. Since we may
  have multiple session ids for a single request due to different cookie
  names
  across apps, we need to store the sacHashtable in the threadlocal.