On 9 February 2015 at 05:07, Matthew Hall <mh...@mhcomputing.net> wrote:
> On Sun, Feb 08, 2015 at 11:07:59AM +0100, Michael Osipov wrote:
>> How would you propose to use it?
>> I would still need a random number or do you recomment to use a static one
>> and simply increment during the lifetime of the application?
>>
>> If so, thing might cause trouble in the future because I would probably
>> store the session information in a database for analysis issues and woudl
>> have collisions.
>>
>> Michael
>
> Then you either have to use real big random's like UUID and accept it'd be
> slow, or derive the numeric values from a native DB counter (for example, a
> Redis counter, or a PostgreSQL sequence data type).

This is a separate issue from the pooling problem.

Depending on how you are intending to create the sessions, it may be
possible to use a cheaper method.
For example combining system time with System.identityHashCode should
work if only a single classloader is ever used at one time.

> Matthew.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to