Home » Support » Forum » Entity Management Config questions

Entity Management Config questions

#1

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

http://www.objectdb.com/java/jpa/setting/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?

#2

The following blog explains the differences:

http://weblogs.java.net/blog/2006/05/04/understanding-weak-references

For more information, please see:

http://www.google.com/search?q=java+strong+weak+soft+reference

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

Post Reply

To post a reply and/or subscribe to update notifications - please login