Issue 248780. Implement JPA 2.0 Cache interface. Checking in code provided by Darani. Code reviewed by Gordon and Andrei. Tests run - regression tests for jpa against mySQL.
diff --git a/src/javax/persistence/EntityManagerFactory.java b/src/javax/persistence/EntityManagerFactory.java
index 67ad663..fb37e98 100644
--- a/src/javax/persistence/EntityManagerFactory.java
+++ b/src/javax/persistence/EntityManagerFactory.java
@@ -82,4 +82,13 @@
* until a call to close has been made.
*/
public boolean isOpen();
+
+ /**
+ * Access the cache that is associated with the entity manager
+ * factory(the "second level cache").
+ * @return instance of the Cache interface
+ * @throws IllegalStateException if the entity manager factory
+ * has been closed.
+ */
+ public Cache getCache();
}