----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


----- Original Message -----
From: "jon *" <[EMAIL PROTECTED]>
To: "Java Apache Users" <[EMAIL PROTECTED]>
Sent: Monday, November 29, 1999 1:17 AM
Subject: Re: HttpSession Unique ID


> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
>
> on 11/28/98 10:42 PM, Stou Sandalski <[EMAIL PROTECTED]> wrote:
>
> Why don't you just read the source code? gezz.
>
> -jon
>

good point... what I found is this (this is the correct part is it not?):

 //  format of id is <random-hex-string>.<count>.<timestamp-ms>

    static synchronized private String getIdentifier () {
      String random =
Long.toHexString(Double.doubleToLongBits(Math.random()));
      String time = Long.toString(System.currentTimeMillis());
      session_count++;

      return random + "." + session_count + "." + time;
    }

not that complicated... but from what I read about the Random object in Java
(which is used by the Math.random() method) if two rand. number generators
are created with the same seed they would produce the same random numbers..
but since you get the time that seems to make it hard to guess it...


Stou



Stou




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to