-->
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.  [ 1 post ] 
Author Message
 Post subject: EhCache integration
PostPosted: Mon Jul 12, 2010 5:54 am 
Newbie

Joined: Mon Jul 12, 2010 5:41 am
Posts: 6
We are creating a web application utilizing a tree-based datastructure. We want this datastructure to be cached by EhCahce to reduce load to our database. Each node object contains a list of children as well as a parent. We have been struggling to get the integration between Hibernate and EhCache working with this setup. It seems as though the entity has already been constructed with all its children, new queries are run through the database in order to re-populate the list of children when we get the list back from the cache. After poking around to figure out how it all works, I found that Hibernate puts entities going to the cache in its own object containing serialized versions of all its fields. This object does not contain links to either the list of children or the parent. By placing the entities into the cache manually, the object is preserved as is, and what you take out contain both these fields as they should be. We have no need to serialize the objects, as we are not going to use distributed cache. My question is: Am I missing some setting of some sort, or is this as designed?


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

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.