ObjectDB ObjectDB

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?

edit
delete
#2

The following blog explains the differences:

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

For more information, please see:

https://www.google.com/search?q=java+strong+weak+soft+reference&gws_rd=ssl

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.