...
The HashSessionIdManager class by default will use the java.security.SecureRandom random number generator. It uses the operating system's source to provide entropy. If your machine is very tranquil, then there may not be enough entropy to drive the random number generator and hence the operating system waits for more interrupts, disk IO, network traffic or whatever is used to generate the entropy.
One An INSECURE solution, apart from loading the machine more
, is to replace the SecureRandom with the java.util.Random generator instead. Add the following lines to your jetty.xml file:
| Code Block | ||
|---|---|---|
| ||
<Set name="sessionIdManager">
<New class="org.mortbay.jetty.servlet.HashSessionIdManager">
<Arg>
<New class="java.util.Random"/>
</Arg>
<Set name="workerName">node1</Set>
</New>
</Set>
|
Session IDs generated by Random may be able to be predicted, thus it is not recommended to use Random in production.