jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Müller <thomas.muel...@day.com>
Subject Re: Threads blocked in org.apache.jackrabbit.core.id.SeededSecureRandom
Date Thu, 07 Oct 2010 06:44:39 GMT

> We have more than 50 threads waiting here.

Is it the same thread number for each of the 50 stack traces, or is it
multiple distinct threads?

Looking at the code, if getInstance() is called concurrently from
multiple threads, each time a new SeededSecureRandom is created, which
is not needed. It would be a bit better to ensure only one
SeededSecureRandom() instance is created. When I anyway change that, I
will also add a bit more entropy to the alternative seed algorithm,
similar to http://code.google.com/p/h2database/source/browse/trunk/h2/src/main/org/h2/util/MathUtils.java#109


View raw message