Hello,
I'm a newbie with openJPA, I would like to know what's the best way to do query caching (in
a JPA 2.x portable way).
My webapp will run on JBoss 7.x (Hibernate) and Websphere 8 (OpenJPA).
From , [1] there's some proprietary API involved.
Is there a portable way, i.e. using hints instead [2]?
Thanks !
[1] http://openjpa.apache.org/builds/2.0.1/apache-openjpa-2.0.1/docs/manual/main.html
OpenJPAEntityManagerFactory oemf = OpenJPAPersistence.cast(emf);
QueryResultCache qcache = oemf.getQueryResultCache();
[2] entityManager.createNamedQuery(
NamedQueries.ETAT_CONTRAT_FIND_ALL, EtatContrat.class).setHint("openjpa.querycache", true);
|