code: private String newSessionId(HttpServletRequest request,long created)
      {
          synchronized(__allSessions)
          {
              // A requested session ID can only be used if it is in the global map of
              // ID but not in this contexts map.  Ie it is an ID in use by another context
              // in this server and thus we are doing a cross context dispatch.
              if (_crossContextSessionIDs)
              {
                  String requested_id=(String)request.getAttribute(__NEW_SESSION_ID);
                  if (requested_id==null)
                      requested_id=request.getRequestedSessionId();
                  if (requested_id !=null && 
                      requested_id!=null && __allSessions.containsKey(requested_id) && !_sessions.containsKey(requested_id))
                  return requested_id;
              }
              
              // pick a new unique ID!
              String id=null;
              while (id==null || id.length()==0 || __allSessions.containsKey(id))
              {
                  long r=_weakRandom
                  ?(hashCode()^Runtime.getRuntime().freeMemory()^_random.nextInt()^(((long)request.hashCode())<<32))
                  :_random.nextLong();
                  r^=created;
                  if (request!=null && request.getRemoteAddr()!=null)
                      r^=request.getRemoteAddr().hashCode();
                  if (r<0)
                      r=-r;
                  id=Long.toString(r,36);
                  
                  String worker = (String)request.getAttribute("org.browsermob.proxy.jetty.http.ajp.JVMRoute");
                  if (worker!=null)
                      id+="."+worker;
                  else if (_workerName!=null)
                      id+="."+_workerName;
              }
              return id;
          }
      }
docs: /* new Session ID.
  If the request has a requestedSessionID which is unique, that is used.
  The session ID is created as a unique random long base 36.
  If the request has a jvmRoute attribute, that is appended as a
  worker tag, else any worker tag set on the manager is appended.
  @param request
  @param created
  @return Session ID.