You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by al...@apache.org on 2011/07/13 21:17:14 UTC
svn commit: r1146252 -
/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml
Author: allee8285
Date: Wed Jul 13 19:17:14 2011
New Revision: 1146252
URL: http://svn.apache.org/viewvc?rev=1146252&view=rev
Log:
Fix sample code typo; em -> emf.
Modified:
openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml
Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml?rev=1146252&r1=1146251&r2=1146252&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml (original)
+++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml Wed Jul 13 19:17:14 2011
@@ -435,9 +435,9 @@ import javax.persistence.Cache;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
. . .
-EntityManagerFactory em =
+EntityManagerFactory emf =
Persistence.createEntityManagerFactory("myPersistenceUnit");
-Cache cache = em.getCache();
+Cache cache = emf.getCache();
. . .
</programlisting>
</example>
@@ -446,7 +446,7 @@ Cache cache = em.getCache();
<title>Using the javax.persistence.Cache interface</title>
<programlisting>
// Check whether the cache contains an entity with a provided ID
-Cache cache = em.getCache();
+Cache cache = emf.getCache();
boolean contains = cache.contains(MyEntity.class, entityID);
// evict a specific entity from the cache