openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georgi Naplatanov <go...@oles.biz>
Subject Re: OpenJPA and ehcache configuration
Date Mon, 11 Oct 2010 15:25:07 GMT
Hello Kevin.

This configuration works fine for me, but I was not sure about all 
configuration parameters. Now all is clear.

Thanks for your replay.

Best regards
Georgi

Kevin Sutter wrote:
> Hi Georgi,
> Your configuration looks right.  Are you experiencing problems with this
> configuration?  I'm not positive that the ehcache team has done verification
> testing with OpenJPA 2.1.x, but the plug point should still work just fine.
> Let us know if you experience problems.
> 
> FYI, the QueryCompilationCache and QuerySQLCache are "on" by default, so
> there's no reason to include the "true" settings in your persistence.xml for
> these two properties.
> 
> The "ehcache" settings are special values that signal to the ehcache plugin
> to set the other cache-related properties accordingly.  That's why you do
> not need to set the RemoteCommitProvider and DataCache properties
> explicitly.
> 
> Good luck,
> Kevin
> 
> 
> On Mon, Oct 11, 2010 at 4:11 AM, Georgi Naplatanov <gosho@oles.biz> wrote:
> 
>> 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
>>
> 


Mime
View raw message