Hi all.
I want to configure ehcache 2.2.0, OpenJPA plugin for ehcache 0.2 and
OpenJPA 2.1-snapshot.
Below are my configuration files, but I am not sure that it's right
configuration.
persistence.xml
<property name="openjpa.QueryCompilationCache" value="true"/>
<property name="openjpa.jdbc.QuerySQLCache" value="true"/>
<property name="openjpa.QueryCache" value="ehcache"/>
<property name="openjpa.DataCacheManager" value="ehcache"/>
ehcache.xml
<?xml version="1.0" encoding="UTF-8"?>
<ehcache>
<defaultCache
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="300"
timeToLiveSeconds="600"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
<!-- OpenJPA data cache -->
<cache name="openjpa"
maxElementsInMemory="5000"
eternal="false"
timeToIdleSeconds="300"
timeToLiveSeconds="600"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
<!-- OpenJPA query cache -->
<cache name="openjpa-querycache"
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="300"
timeToLiveSeconds="600"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
</ehcache>
Is this configuration correct ?
Should I configure :
- "openjpa.DataCache" and "openjpa.RemoteCommitProvider" in
persistence.xml
- additional cache names in ehcache.xml
Best regards
Georgi