Hibernate thread-safe collections
问题 This is somewhat of a continuation of Hibernate session thread safety. All of the details apply here as well. In simplified terms, execution follows the pattern of: 1. Read entity 2. Do expensive, easily parallelizable work 3. Persist changes The entities are all configured for eager loading, and the session is not accessed at all during 2. The work involved in 2 requires infrequent modification of a persistent collection. This is what I have now: synchronized (parentEntity) { parentEntity