code: protected Object adaptAndSetCookie(ServletRequest req, ServletResponse res, SessionAffinityContext sac, ISession isess) {
          Object adaptedSession = null;
          if (isess != null) {
              adaptedSession = _adapter.adapt(isess);
              sac.setResponseSessionID(isess.getId());
              sac.setResponseSessionVersion(isess.getVersion());
              _sam.setCookie(req, res, sac, adaptedSession);
          }
          return adaptedSession;
      }
docs: /*
  Method used to get the HttpSession object, do some crossover checking, and
  then
  set the cookie.