ObjectDB ObjectDB

Entity Management Config questions


Hi, the manual states the following regarding config of Entities:


<cache ref="weak" level2="0mb" />

The <cache> element specifies settings of the two cache mechanisms for entities:

  • The ref attribute specifies the reference type for holding non dirty entities in the persistence context of the EntityManager (which serves as a first level cache). The valid values are "weak", "soft" and "strong". Modified entities are always held by strong references in the persistence context (until commit or flush), regardless of this setting.

Question: What exactly is the difference between "weak", "soft", and "strong" references?


The following blog explains the differences:


For more information, please see:


ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply