Quick Start

 

Products & Services

 

Training Dates

US - San Francisco
Apr 29-30, 2010
Jun 28-29, 2010
Oct 6-7, 2010
Nov 11-12, 2010
Dec 2-3, 2010
Feb 4-5, 2011

India - Delhi
Feb 4-5, 2010
June 17-18, 2010
Dec 2-3, 2010

See training details.

 

Blogs & Tweets

OpenJPA Caching Provider

Ehcache easily integrates with the OpenJPA persistence framework.

Installing

To use it, add a Maven dependency for ehcache-openjpa.

    <groupId>net.sf.ehcache</groupId>
    <artifactId>ehcache-openjpa</artifactId>
    <version>0.1</version>

or download from downloads.

Configuration

Set OpenJPA�s openjpa.QueryCache to ehcache and openjpa.DataCacheManager to ehcache. That�s it!

See http://openjpa.apache.org/builds/1.0.2/apache-openjpa-1.0.2/docs/manual/ref_guide_caching.html for more on caching in OpenJPA.

Default Cache

As with Hibernate, Ehcache's OpenJPA module (from 0.2) uses the defaultCache configured in ehcache.xml to create caches.

For production, we recommend configuring a cache configuration in ehcache.xml for each cache, so that it may be correctly tuned.