tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@gmx.at
Subject Re: Session creation speed
Date Tue, 23 Jan 2001 11:22:28 GMT
>When the getSession line is reached in the code it freezes 
>for around 9-10 seconds before returning a session, leading 
>the user to think theyre not going to get anything back...

That's because of the secure random number generator that's used to create the session ID
- it takes quite some time to initialize.

You could try adding 

-dtomcat.sessionid.randomclass=java.util.Random

to the JVM's command line (i.e. add the above string to TOMCAT_OPTS) which makes Tomcat use
the standard JAVA random number generator... I guess they're using the SecureRandom generator
because it'll make guessing the next session ID harder based on the current one, but I think
that that's not needed for development purposes, especially with that speed hit incurred by
using the SecureRandom generator...

Hope this helps.

np: Flanger - Stepping Out Of My Dream (Midnight Sound)

---------------------------------------------------------------------
Sent through MailGateway - http://www.ssw.uni-linz.ac.at:2000/
Send or read your emails anywhere.
---------------------------------------------------------------------

Mime
View raw message