openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandhya Kishore <>
Subject Re: Strange issue with using DataCache
Date Wed, 10 Dec 2008 00:37:12 GMT
Hi Jeff,

       One more thing is if you want your entities to be stored in the datacache @DataCache
annotation should be specified on those entities. Otherwise even though you specify the cache
size to so much and enable the datacache, these entities might not be stored in the cache.
Also I could not reproduce the problem. I have set the same properties as specified and tries
to find some entities and it seemed work fine for me. Can you send your testcase along with
your entities and configuration that you have specified? 
Also what is it mean when you say "entity set's always have size of zero"


--- On Tue, 12/9/08, Boring, Jeff W (N-Viper) <> wrote:
From: Boring, Jeff W (N-Viper) <>
Subject: Strange issue with using DataCache
Date: Tuesday, December 9, 2008, 3:29 PM

Using OpenJpa v1.0.0

When the following
 properties exist in the persistence.xml file, entity
set's always have size of zero and test cases fail. 

	<property name="openjpa.DataCache"
value="true(CacheSize=5000000, 		SoftReferenceSize=0)" />
	<property name="openjpa.RemoteCommitProvider"

Changing the DataCache property value to false corrects the issue; all
test pass.

I've used the DataCache before in a sample/simple app but now I am
trying to apply it to a production app. I implemented the DataCache fine
but noticed that test cases were failing. I then just turned it off and
everything worked again, but, of course, no cache. I then took out all
new code (except 2 properties above) including the @DataCache
annotations and reran the tests and it still fails when dataCache is set
to true. Passes when set to false.

I then debugged, stepping thru a test and discovered than the sets are
all empty.

 for the long question. Thanks for any help you can give.


Jeff W. Boring
Lockheed Martin
Orlando, Fl 32825

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message