[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4660) Support Cache Retrieve Mode and Cache Store Mode Properties

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Jan 21 15:21:29 EST 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole updated HHH-4660:
--------------------------------

    Description: 
Specified by section 3.7.2

Essentially analogous to the older Hibernate notion of org.hibernate.CacheMode, except that JPA splits the read and write phases into separate discrete values for retrieving and storing.

In terms of specifying "retrieval behavior", users would use the "javax.persistence.cache.retrieveMode" (org.hibernate.ejb.AvailableSettings#SHARED_CACHE_RETRIEVE_MODE) property, with a value corresponding to one of the javax.persistence.CacheRetrieveMode enum values.

For "storage behavior", there is the javax.persistence.cache.storeMode (org.hibernate.ejb.AvailableSettings#SHARED_CACHE_STORE_MODE) property and the corresponding javax.persistence.CacheStoreMode enum values.

These values cannot be specified on the EMF, so each EM starts with a fresh default set of behaviors (javax.persistence.CacheRetrieveMode#USE and javax.persistence.CacheStoreMode#USE).  The default for a given EM can be altered using EntityManager#setProperty

It is also valid to alter either (or both) the retrieval or storage behavior via:
* any of the EntityManager#find methods taking a Map of hints; valid for both retrieve and store.
* any of the EntityManager#refresh methods taking a Map of hints; only valid for store, as refresh always hits the database (retrieveMode is ignored)
* Query/TypedQuery#setHint; valid for both retrieve and store.

> Support Cache Retrieve Mode and Cache Store Mode Properties
> -----------------------------------------------------------
>
>                 Key: HHH-4660
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4660
>             Project: Hibernate Core
>          Issue Type: Sub-task
>          Components: caching (L2), entity-manager
>            Reporter: Emmanuel Bernard
>            Assignee: Steve Ebersole
>             Fix For: 3.5.0-Beta-4
>
>
> Specified by section 3.7.2
> Essentially analogous to the older Hibernate notion of org.hibernate.CacheMode, except that JPA splits the read and write phases into separate discrete values for retrieving and storing.
> In terms of specifying "retrieval behavior", users would use the "javax.persistence.cache.retrieveMode" (org.hibernate.ejb.AvailableSettings#SHARED_CACHE_RETRIEVE_MODE) property, with a value corresponding to one of the javax.persistence.CacheRetrieveMode enum values.
> For "storage behavior", there is the javax.persistence.cache.storeMode (org.hibernate.ejb.AvailableSettings#SHARED_CACHE_STORE_MODE) property and the corresponding javax.persistence.CacheStoreMode enum values.
> These values cannot be specified on the EMF, so each EM starts with a fresh default set of behaviors (javax.persistence.CacheRetrieveMode#USE and javax.persistence.CacheStoreMode#USE).  The default for a given EM can be altered using EntityManager#setProperty
> It is also valid to alter either (or both) the retrieval or storage behavior via:
> * any of the EntityManager#find methods taking a Map of hints; valid for both retrieve and store.
> * any of the EntityManager#refresh methods taking a Map of hints; only valid for store, as refresh always hits the database (retrieveMode is ignored)
> * Query/TypedQuery#setHint; valid for both retrieve and store.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list