You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Georgi Naplatanov <go...@oles.biz> on 2010/10/11 11:11:45 UTC

OpenJPA and ehcache configuration

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

RE: OpenJPA and ehcache configuration

Posted by revathy <re...@mindtree.com>.
Hi Georgi,

Thanks. Now it is taking. What s the reason??



From: Georgi Naplatanov [via OpenJPA] [mailto:ml-node+6097014-828808144-322305@n2.nabble.com]
Sent: Monday, March 07, 2011 5:30 PM
To: Revathy Pandian
Subject: Re: OpenJPA and ehcache configuration

Hi revathy.

Put Ehcache.xml file in the "WEB-INF/classes/" folder in case it is a
web application.

Regards
Georgi

On 03/07/2011 01:46 PM, revathy wrote:

> Hi Georgi,
>
>     Thank you very much.
> It s working. But the warning it shows as
> "WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/D:/workspace/HeliosWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/EHcachePOC/WEB-INF/lib/ehcache-core-2.3.1.jar!/ehcache-failsafe.xml"
>
> I have added ehcache.xml in class path, It is in lib folder now. But it s not taking that xml.
>
> Do u have any idea.
>
> From: Georgi Naplatanov [via OpenJPA] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=6097014&i=0&by-user=t>]
> Sent: Monday, March 07, 2011 4:55 PM
> To: Revathy Pandian
> Subject: Re: OpenJPA and ehcache configuration
>
> Hi revathy.
>
> 1. My persistence.xml file looks like :
>
>          <property name="openjpa.QueryCache" value="ehcache"/>
>
>          <property name="openjpa.DataCacheManager" value="ehcache"/>
>
>
> 2. Ehcache.xml has to be in the classpath, not in Metainf folder.
>
> 3. I use 0.2.0 version of Ehcache OpenJPA plugin
> (ehcache-openjpa-0.2.0.jar).
>
> HTH
>
> Regards
> Georgi
>
> On 03/07/2011 11:35 AM, revathy wrote:
>
>> Hi Georgi,
>>
>>      Can you help me to make OpenJPA work with Ecache??
>> I have done the following configurations.
>>
>>
>> 1.       In Persistence.xml ,
>>     <property name="openjpa.QueryCache" value="net.sf.ehcache.openjpa.datacache.EhCacheQueryCache"/>
>>
>>                      <property name="openjpa.DataCacheManager" value="net.sf.ehcache.openjpa.datacache.EhCacheDataCacheManager"/>
>>
>>                      <property name="openjpa.Log" value="SQL=TRACE"/>
>>
>> 2.  Ehcache.xml is placed in Metainf folder.
>>
>> 3.  ehcache-openjpa-0.1.jar, ehcache-core-2.3.1.jar, slf4j-api-1.5.11.jar, slf4j-jdk14-1.6.1.jar are in the classpath.
>>
>> But Ehacahe is not working for me.
>>
>> Please help me out
>>
>>
>> From: Georgi Naplatanov [via OpenJPA] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=6096908&i=0&by-user=t>]
>> Sent: Monday, March 07, 2011 2:46 PM
>> To: Revathy Pandian
>> Subject: Re: OpenJPA and ehcache configuration
>>
>> Hi revathy.
>>
>> I use the following jar files :
>>
>>     - ehcache-core-2.2.0.jar
>>     - slf4j-api-1.5.11.jar
>>     - slf4j-jdk14-1.5.11.jar
>>     - ehcache-openjpa-0.2.0.jar (Ehcache OpenJPA plugin)
>>
>> Regards
>> Georgi
>>
>> On 03/07/2011 08:53 AM, revathy wrote:
>>> Hi,
>>>
>>>       Can u tell me what jar u are using to make this configuration works??
>>>
>>> --
>>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e&by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e%3chttp://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e&by-user=t%3e&by-user=t>
>>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html?by-user=t%3e&by-user=t>
>>
>>
>> ________________________________
>>
>> http://www.mindtree.com/email/disclaimer.html
>>
>>
>> --
>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html?by-user=t%3e&by-user=t>
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096908.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096908.html?by-user=t>
>
>
>
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096977.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096977.html?by-user=t>
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6097014.html
To unsubscribe from OpenJPA and ehcache configuration, click here<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5622421&code=cmV2YXRoeV9wYW5kaWFuQG1pbmR0cmVlLmNvbXw1NjIyNDIxfDc5MjQxMTA0>.


--
View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6097112.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: OpenJPA and ehcache configuration

Posted by Georgi Naplatanov <go...@oles.biz>.
Hi revathy.

 >    Do u have any idea to invalidate the cache value in Ehcache?
I have not.

Regards
Georgi

On 03/08/2011 10:32 AM, revathy wrote:
>
> Hi Georgi,
>    Do u have any idea to invalidate the cache value in Ehcache?
>
>
> From: Georgi Naplatanov [via OpenJPA] [mailto:ml-node+6097014-828808144-322305@n2.nabble.com]
> Sent: Monday, March 07, 2011 5:30 PM
> To: Revathy Pandian
> Subject: Re: OpenJPA and ehcache configuration
>
> Hi revathy.
>
> Put Ehcache.xml file in the "WEB-INF/classes/" folder in case it is a
> web application.
>
> Regards
> Georgi
>
> On 03/07/2011 01:46 PM, revathy wrote:
>
>> Hi Georgi,
>>
>>      Thank you very much.
>> It s working. But the warning it shows as
>> "WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/D:/workspace/HeliosWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/EHcachePOC/WEB-INF/lib/ehcache-core-2.3.1.jar!/ehcache-failsafe.xml"
>>
>> I have added ehcache.xml in class path, It is in lib folder now. But it s not taking that xml.
>>
>> Do u have any idea.
>>
>> From: Georgi Naplatanov [via OpenJPA] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=6097014&i=0&by-user=t>]
>> Sent: Monday, March 07, 2011 4:55 PM
>> To: Revathy Pandian
>> Subject: Re: OpenJPA and ehcache configuration
>>
>> Hi revathy.
>>
>> 1. My persistence.xml file looks like :
>>
>>           <property name="openjpa.QueryCache" value="ehcache"/>
>>
>>           <property name="openjpa.DataCacheManager" value="ehcache"/>
>>
>>
>> 2. Ehcache.xml has to be in the classpath, not in Metainf folder.
>>
>> 3. I use 0.2.0 version of Ehcache OpenJPA plugin
>> (ehcache-openjpa-0.2.0.jar).
>>
>> HTH
>>
>> Regards
>> Georgi
>>
>> On 03/07/2011 11:35 AM, revathy wrote:
>>
>>> Hi Georgi,
>>>
>>>       Can you help me to make OpenJPA work with Ecache??
>>> I have done the following configurations.
>>>
>>>
>>> 1.       In Persistence.xml ,
>>>      <property name="openjpa.QueryCache" value="net.sf.ehcache.openjpa.datacache.EhCacheQueryCache"/>
>>>
>>>                       <property name="openjpa.DataCacheManager" value="net.sf.ehcache.openjpa.datacache.EhCacheDataCacheManager"/>
>>>
>>>                       <property name="openjpa.Log" value="SQL=TRACE"/>
>>>
>>> 2.  Ehcache.xml is placed in Metainf folder.
>>>
>>> 3.  ehcache-openjpa-0.1.jar, ehcache-core-2.3.1.jar, slf4j-api-1.5.11.jar, slf4j-jdk14-1.6.1.jar are in the classpath.
>>>
>>> But Ehacahe is not working for me.
>>>
>>> Please help me out
>>>
>>>
>>> From: Georgi Naplatanov [via OpenJPA] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=6096908&i=0&by-user=t>]
>>> Sent: Monday, March 07, 2011 2:46 PM
>>> To: Revathy Pandian
>>> Subject: Re: OpenJPA and ehcache configuration
>>>
>>> Hi revathy.
>>>
>>> I use the following jar files :
>>>
>>>      - ehcache-core-2.2.0.jar
>>>      - slf4j-api-1.5.11.jar
>>>      - slf4j-jdk14-1.5.11.jar
>>>      - ehcache-openjpa-0.2.0.jar (Ehcache OpenJPA plugin)
>>>
>>> Regards
>>> Georgi
>>>
>>> On 03/07/2011 08:53 AM, revathy wrote:
>>>> Hi,
>>>>
>>>>        Can u tell me what jar u are using to make this configuration works??
>>>>
>>>> --
>>>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e&by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e%3chttp://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e&by-user=t%3e&by-user=t>
>>>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion below:
>>> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html?by-user=t%3e&by-user=t>
>>>
>>>
>>> ________________________________
>>>
>>> http://www.mindtree.com/email/disclaimer.html
>>>
>>>
>>> --
>>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html?by-user=t%3e&by-user=t>
>>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096908.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096908.html?by-user=t>
>>
>>
>>
>> --
>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096977.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096977.html?by-user=t>
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6097014.html
> To unsubscribe from OpenJPA and ehcache configuration, click here<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5622421&code=cmV2YXRoeV9wYW5kaWFuQG1pbmR0cmVlLmNvbXw1NjIyNDIxfDc5MjQxMTA0>.
>
>
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6114807.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

RE: OpenJPA and ehcache configuration

Posted by revathy <re...@mindtree.com>.
Hi Georgi,
  Do u have any idea to invalidate the cache value in Ehcache?


From: Georgi Naplatanov [via OpenJPA] [mailto:ml-node+6097014-828808144-322305@n2.nabble.com]
Sent: Monday, March 07, 2011 5:30 PM
To: Revathy Pandian
Subject: Re: OpenJPA and ehcache configuration

Hi revathy.

Put Ehcache.xml file in the "WEB-INF/classes/" folder in case it is a
web application.

Regards
Georgi

On 03/07/2011 01:46 PM, revathy wrote:

> Hi Georgi,
>
>     Thank you very much.
> It s working. But the warning it shows as
> "WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/D:/workspace/HeliosWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/EHcachePOC/WEB-INF/lib/ehcache-core-2.3.1.jar!/ehcache-failsafe.xml"
>
> I have added ehcache.xml in class path, It is in lib folder now. But it s not taking that xml.
>
> Do u have any idea.
>
> From: Georgi Naplatanov [via OpenJPA] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=6097014&i=0&by-user=t>]
> Sent: Monday, March 07, 2011 4:55 PM
> To: Revathy Pandian
> Subject: Re: OpenJPA and ehcache configuration
>
> Hi revathy.
>
> 1. My persistence.xml file looks like :
>
>          <property name="openjpa.QueryCache" value="ehcache"/>
>
>          <property name="openjpa.DataCacheManager" value="ehcache"/>
>
>
> 2. Ehcache.xml has to be in the classpath, not in Metainf folder.
>
> 3. I use 0.2.0 version of Ehcache OpenJPA plugin
> (ehcache-openjpa-0.2.0.jar).
>
> HTH
>
> Regards
> Georgi
>
> On 03/07/2011 11:35 AM, revathy wrote:
>
>> Hi Georgi,
>>
>>      Can you help me to make OpenJPA work with Ecache??
>> I have done the following configurations.
>>
>>
>> 1.       In Persistence.xml ,
>>     <property name="openjpa.QueryCache" value="net.sf.ehcache.openjpa.datacache.EhCacheQueryCache"/>
>>
>>                      <property name="openjpa.DataCacheManager" value="net.sf.ehcache.openjpa.datacache.EhCacheDataCacheManager"/>
>>
>>                      <property name="openjpa.Log" value="SQL=TRACE"/>
>>
>> 2.  Ehcache.xml is placed in Metainf folder.
>>
>> 3.  ehcache-openjpa-0.1.jar, ehcache-core-2.3.1.jar, slf4j-api-1.5.11.jar, slf4j-jdk14-1.6.1.jar are in the classpath.
>>
>> But Ehacahe is not working for me.
>>
>> Please help me out
>>
>>
>> From: Georgi Naplatanov [via OpenJPA] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=6096908&i=0&by-user=t>]
>> Sent: Monday, March 07, 2011 2:46 PM
>> To: Revathy Pandian
>> Subject: Re: OpenJPA and ehcache configuration
>>
>> Hi revathy.
>>
>> I use the following jar files :
>>
>>     - ehcache-core-2.2.0.jar
>>     - slf4j-api-1.5.11.jar
>>     - slf4j-jdk14-1.5.11.jar
>>     - ehcache-openjpa-0.2.0.jar (Ehcache OpenJPA plugin)
>>
>> Regards
>> Georgi
>>
>> On 03/07/2011 08:53 AM, revathy wrote:
>>> Hi,
>>>
>>>       Can u tell me what jar u are using to make this configuration works??
>>>
>>> --
>>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e&by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e%3chttp://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e&by-user=t%3e&by-user=t>
>>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html?by-user=t%3e&by-user=t>
>>
>>
>> ________________________________
>>
>> http://www.mindtree.com/email/disclaimer.html
>>
>>
>> --
>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html?by-user=t%3e&by-user=t>
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096908.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096908.html?by-user=t>
>
>
>
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096977.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096977.html?by-user=t>
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6097014.html
To unsubscribe from OpenJPA and ehcache configuration, click here<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5622421&code=cmV2YXRoeV9wYW5kaWFuQG1pbmR0cmVlLmNvbXw1NjIyNDIxfDc5MjQxMTA0>.


--
View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6114807.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: OpenJPA and ehcache configuration

Posted by Georgi Naplatanov <go...@oles.biz>.
Hi revathy.

Put Ehcache.xml file in the "WEB-INF/classes/" folder in case it is a 
web application.

Regards
Georgi

On 03/07/2011 01:46 PM, revathy wrote:
> Hi Georgi,
>
>     Thank you very much.
> It s working. But the warning it shows as
> "WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/D:/workspace/HeliosWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/EHcachePOC/WEB-INF/lib/ehcache-core-2.3.1.jar!/ehcache-failsafe.xml"
>
> I have added ehcache.xml in class path, It is in lib folder now. But it s not taking that xml.
>
> Do u have any idea.
>
> From: Georgi Naplatanov [via OpenJPA] [mailto:ml-node+6096908-737609752-322305@n2.nabble.com]
> Sent: Monday, March 07, 2011 4:55 PM
> To: Revathy Pandian
> Subject: Re: OpenJPA and ehcache configuration
>
> Hi revathy.
>
> 1. My persistence.xml file looks like :
>
>          <property name="openjpa.QueryCache" value="ehcache"/>
>
>          <property name="openjpa.DataCacheManager" value="ehcache"/>
>
>
> 2. Ehcache.xml has to be in the classpath, not in Metainf folder.
>
> 3. I use 0.2.0 version of Ehcache OpenJPA plugin
> (ehcache-openjpa-0.2.0.jar).
>
> HTH
>
> Regards
> Georgi
>
> On 03/07/2011 11:35 AM, revathy wrote:
>
>> Hi Georgi,
>>
>>      Can you help me to make OpenJPA work with Ecache??
>> I have done the following configurations.
>>
>>
>> 1.       In Persistence.xml ,
>>     <property name="openjpa.QueryCache" value="net.sf.ehcache.openjpa.datacache.EhCacheQueryCache"/>
>>
>>                      <property name="openjpa.DataCacheManager" value="net.sf.ehcache.openjpa.datacache.EhCacheDataCacheManager"/>
>>
>>                      <property name="openjpa.Log" value="SQL=TRACE"/>
>>
>> 2.  Ehcache.xml is placed in Metainf folder.
>>
>> 3.  ehcache-openjpa-0.1.jar, ehcache-core-2.3.1.jar, slf4j-api-1.5.11.jar, slf4j-jdk14-1.6.1.jar are in the classpath.
>>
>> But Ehacahe is not working for me.
>>
>> Please help me out
>>
>>
>> From: Georgi Naplatanov [via OpenJPA] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=6096908&i=0&by-user=t>]
>> Sent: Monday, March 07, 2011 2:46 PM
>> To: Revathy Pandian
>> Subject: Re: OpenJPA and ehcache configuration
>>
>> Hi revathy.
>>
>> I use the following jar files :
>>
>>     - ehcache-core-2.2.0.jar
>>     - slf4j-api-1.5.11.jar
>>     - slf4j-jdk14-1.5.11.jar
>>     - ehcache-openjpa-0.2.0.jar (Ehcache OpenJPA plugin)
>>
>> Regards
>> Georgi
>>
>> On 03/07/2011 08:53 AM, revathy wrote:
>>> Hi,
>>>
>>>       Can u tell me what jar u are using to make this configuration works??
>>>
>>> --
>>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e&by-user=t>
>>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html?by-user=t>
>>
>>
>> ________________________________
>>
>> http://www.mindtree.com/email/disclaimer.html
>>
>>
>> --
>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html?by-user=t>
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096908.html
> To unsubscribe from OpenJPA and ehcache configuration, click here<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5622421&code=cmV2YXRoeV9wYW5kaWFuQG1pbmR0cmVlLmNvbXw1NjIyNDIxfDc5MjQxMTA0>.
>
>
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096977.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

RE: OpenJPA and ehcache configuration

Posted by revathy <re...@mindtree.com>.
Hi Georgi,

   Thank you very much.
It s working. But the warning it shows as
"WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/D:/workspace/HeliosWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/EHcachePOC/WEB-INF/lib/ehcache-core-2.3.1.jar!/ehcache-failsafe.xml"

I have added ehcache.xml in class path, It is in lib folder now. But it s not taking that xml.

Do u have any idea.

From: Georgi Naplatanov [via OpenJPA] [mailto:ml-node+6096908-737609752-322305@n2.nabble.com]
Sent: Monday, March 07, 2011 4:55 PM
To: Revathy Pandian
Subject: Re: OpenJPA and ehcache configuration

Hi revathy.

1. My persistence.xml file looks like :

        <property name="openjpa.QueryCache" value="ehcache"/>

        <property name="openjpa.DataCacheManager" value="ehcache"/>


2. Ehcache.xml has to be in the classpath, not in Metainf folder.

3. I use 0.2.0 version of Ehcache OpenJPA plugin
(ehcache-openjpa-0.2.0.jar).

HTH

Regards
Georgi

On 03/07/2011 11:35 AM, revathy wrote:

> Hi Georgi,
>
>     Can you help me to make OpenJPA work with Ecache??
> I have done the following configurations.
>
>
> 1.       In Persistence.xml ,
>    <property name="openjpa.QueryCache" value="net.sf.ehcache.openjpa.datacache.EhCacheQueryCache"/>
>
>                     <property name="openjpa.DataCacheManager" value="net.sf.ehcache.openjpa.datacache.EhCacheDataCacheManager"/>
>
>                     <property name="openjpa.Log" value="SQL=TRACE"/>
>
> 2.  Ehcache.xml is placed in Metainf folder.
>
> 3.  ehcache-openjpa-0.1.jar, ehcache-core-2.3.1.jar, slf4j-api-1.5.11.jar, slf4j-jdk14-1.6.1.jar are in the classpath.
>
> But Ehacahe is not working for me.
>
> Please help me out
>
>
> From: Georgi Naplatanov [via OpenJPA] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=6096908&i=0&by-user=t>]
> Sent: Monday, March 07, 2011 2:46 PM
> To: Revathy Pandian
> Subject: Re: OpenJPA and ehcache configuration
>
> Hi revathy.
>
> I use the following jar files :
>
>    - ehcache-core-2.2.0.jar
>    - slf4j-api-1.5.11.jar
>    - slf4j-jdk14-1.5.11.jar
>    - ehcache-openjpa-0.2.0.jar (Ehcache OpenJPA plugin)
>
> Regards
> Georgi
>
> On 03/07/2011 08:53 AM, revathy wrote:
>> Hi,
>>
>>      Can u tell me what jar u are using to make this configuration works??
>>
>> --
>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t><http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html%3chttp:/openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t%3e&by-user=t>
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html?by-user=t>
>
>
> ________________________________
>
> http://www.mindtree.com/email/disclaimer.html
>
>
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html?by-user=t>
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096908.html
To unsubscribe from OpenJPA and ehcache configuration, click here<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5622421&code=cmV2YXRoeV9wYW5kaWFuQG1pbmR0cmVlLmNvbXw1NjIyNDIxfDc5MjQxMTA0>.


--
View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096977.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: OpenJPA and ehcache configuration

Posted by Georgi Naplatanov <go...@oles.biz>.
Hi revathy.

1. My persistence.xml file looks like :

	<property name="openjpa.QueryCache" value="ehcache"/>
      			
	<property name="openjpa.DataCacheManager" value="ehcache"/>


2. Ehcache.xml has to be in the classpath, not in Metainf folder.

3. I use 0.2.0 version of Ehcache OpenJPA plugin 
(ehcache-openjpa-0.2.0.jar).

HTH

Regards
Georgi

On 03/07/2011 11:35 AM, revathy wrote:
> Hi Georgi,
>
>     Can you help me to make OpenJPA work with Ecache??
> I have done the following configurations.
>
>
> 1.       In Persistence.xml ,
>    <property name="openjpa.QueryCache" value="net.sf.ehcache.openjpa.datacache.EhCacheQueryCache"/>
>
>                     <property name="openjpa.DataCacheManager" value="net.sf.ehcache.openjpa.datacache.EhCacheDataCacheManager"/>
>
>                     <property name="openjpa.Log" value="SQL=TRACE"/>
>
> 2.  Ehcache.xml is placed in Metainf folder.
>
> 3.  ehcache-openjpa-0.1.jar, ehcache-core-2.3.1.jar, slf4j-api-1.5.11.jar, slf4j-jdk14-1.6.1.jar are in the classpath.
>
> But Ehacahe is not working for me.
>
> Please help me out
>
>
> From: Georgi Naplatanov [via OpenJPA] [mailto:ml-node+6096581-2017424-322305@n2.nabble.com]
> Sent: Monday, March 07, 2011 2:46 PM
> To: Revathy Pandian
> Subject: Re: OpenJPA and ehcache configuration
>
> Hi revathy.
>
> I use the following jar files :
>
>    - ehcache-core-2.2.0.jar
>    - slf4j-api-1.5.11.jar
>    - slf4j-jdk14-1.5.11.jar
>    - ehcache-openjpa-0.2.0.jar (Ehcache OpenJPA plugin)
>
> Regards
> Georgi
>
> On 03/07/2011 08:53 AM, revathy wrote:
>> Hi,
>>
>>      Can u tell me what jar u are using to make this configuration works??
>>
>> --
>> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t>
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html
> To unsubscribe from OpenJPA and ehcache configuration, click here<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5622421&code=cmV2YXRoeV9wYW5kaWFuQG1pbmR0cmVlLmNvbXw1NjIyNDIxfDc5MjQxMTA0>.
>
> ________________________________
>
> http://www.mindtree.com/email/disclaimer.html
>
>
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

RE: OpenJPA and ehcache configuration

Posted by revathy <re...@mindtree.com>.
Hi Georgi,

   Can you help me to make OpenJPA work with Ecache??
I have done the following configurations.


1.       In Persistence.xml ,
  <property name="openjpa.QueryCache" value="net.sf.ehcache.openjpa.datacache.EhCacheQueryCache"/>

                   <property name="openjpa.DataCacheManager" value="net.sf.ehcache.openjpa.datacache.EhCacheDataCacheManager"/>

                   <property name="openjpa.Log" value="SQL=TRACE"/>

2.  Ehcache.xml is placed in Metainf folder.

3.  ehcache-openjpa-0.1.jar, ehcache-core-2.3.1.jar, slf4j-api-1.5.11.jar, slf4j-jdk14-1.6.1.jar are in the classpath.

But Ehacahe is not working for me.

Please help me out


From: Georgi Naplatanov [via OpenJPA] [mailto:ml-node+6096581-2017424-322305@n2.nabble.com]
Sent: Monday, March 07, 2011 2:46 PM
To: Revathy Pandian
Subject: Re: OpenJPA and ehcache configuration

Hi revathy.

I use the following jar files :

  - ehcache-core-2.2.0.jar
  - slf4j-api-1.5.11.jar
  - slf4j-jdk14-1.5.11.jar
  - ehcache-openjpa-0.2.0.jar (Ehcache OpenJPA plugin)

Regards
Georgi

On 03/07/2011 08:53 AM, revathy wrote:
> Hi,
>
>     Can u tell me what jar u are using to make this configuration works??
>
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html<http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html?by-user=t>
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096581.html
To unsubscribe from OpenJPA and ehcache configuration, click here<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5622421&code=cmV2YXRoeV9wYW5kaWFuQG1pbmR0cmVlLmNvbXw1NjIyNDIxfDc5MjQxMTA0>.

________________________________

http://www.mindtree.com/email/disclaimer.html


--
View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096634.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: OpenJPA and ehcache configuration

Posted by Georgi Naplatanov <go...@oles.biz>.
Hi revathy.

I use the following jar files :

  - ehcache-core-2.2.0.jar
  - slf4j-api-1.5.11.jar
  - slf4j-jdk14-1.5.11.jar
  - ehcache-openjpa-0.2.0.jar (Ehcache OpenJPA plugin)

Regards
Georgi

On 03/07/2011 08:53 AM, revathy wrote:
> Hi,
>
>     Can u tell me what jar u are using to make this configuration works??
>
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: OpenJPA and ehcache configuration

Posted by revathy <re...@mindtree.com>.
Hi,

   Can u tell me what jar u are using to make this configuration works??

--
View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-and-ehcache-configuration-tp5622421p6096335.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: OpenJPA and ehcache configuration

Posted by Georgi Naplatanov <go...@oles.biz>.
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 <go...@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
>>
> 


Re: OpenJPA and ehcache configuration

Posted by Kevin Sutter <kw...@gmail.com>.
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 <go...@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
>