-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: “Cached item was locked”
PostPosted: Fri Mar 13, 2009 3:41 pm 
Newbie

Joined: Tue Jul 22, 2008 5:11 pm
Posts: 16
I have an Entity that I am caching. That entity has a One-Many Bi-Directional Relationship with both sides being Lazily Fetched. I am using a ReadWriteCache with EHCache. I am trying to avoid hibernate generating select statements.

The cache works good for the main entity, but it is still generating select statements for each element in the One-Many list.

I get this in my logs when Hibernate looks it up in the cache:

"Cached item was locked"

What would cause that? How can I fix it?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 13, 2009 3:56 pm 
Newbie

Joined: Tue Jul 22, 2008 5:11 pm
Posts: 16
Here is the portion of the log (I had to make some changes in bold). sourceInformation is the name of the HashMap (One-Many relationship)

Cache lookup: com.XXXX.sourceInformation#1
DEBUG 13-03 14:49:00,040 (EhCache.java:get:68):
key: com.XXXX.sourceInformation#1
DEBUG 13-03 14:49:00,040 (ReadWriteCache.java:get:94):
Cached item was locked: com.XXXX.sourceInformation#1
Hibernate: select statement
DEBUG 13-03 14:49:00,040 (ReadWriteCache.java:put:148):
Caching: com.XXXX.sourceInformation#1
DEBUG 13-03 14:49:00,040 (EhCache.java:get:68):
key: com.XXXX.sourceInformation#1
DEBUG 13-03 14:49:00,040 (ReadWriteCache.java:put:160):
Cached: com.XXXX.sourceInformation#1


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.