-->
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.  [ 3 posts ] 
Author Message
 Post subject: JVM level cache operation
PostPosted: Thu Jan 22, 2004 8:38 pm 
Beginner
Beginner

Joined: Thu Jan 22, 2004 8:22 pm
Posts: 48
I've been trying to use EHCache to improve performance of a readonly web application I've developed with Hibernate. I seem to be able to get the cache to come into play when I explicity do a session.load of a object but what about were I've loaded an instance of object A and it has a reference to an instance of Object B? If I issue a call for A again in another session will it load B as well from the cache. Will the reference to B only be handled by the cache if I use session.load or session.iterate for A. Even with all the classes marked <cache usage="read-only" /> I seem to be getting a lot of database activity. About the same as I has beofre I started. I thought when A was pulled from the cache all of it's references would be intact and no further database activity would occur but that doesn't seemto be the case.

Am I misuderstanding the write up or is there something further I have to do? I've specified the cache provider and added the <cache...> tag to all the classes. I can see in the info output that the plugin loads and a cache is created for each class so I think I have it mostly configured correct.

One differnce between my setup though and the examples is that many of the classes involved in the relationships are actually sub-classes. So the cache tag is on the mapping descriptor for the base class. That should also apply to all the sub-classes declared in that smae descriptor right?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2004 8:59 pm 
Beginner
Beginner

Joined: Thu Jan 22, 2004 8:22 pm
Posts: 48
I just noticed this forum post. My application uses a connection provided to it to open the session. Would this also affect a read-only cache. The post only discusses read-write caches which isn't what I'm doing. Maybe I better get more familiar with the cache code. Any advise would be welcome.
http://forum.hibernate.org/viewtopic.php?t=926892&highlight=cache


Top
 Profile  
 
 Post subject: Re: JVM level cache operation
PostPosted: Fri Jan 23, 2004 3:12 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
JustKeith wrote:
I've been trying to use EHCache to improve performance of a readonly web application I've developed with Hibernate.

Cache content of readonly web applications. It is a good way to generate static content to file after data changes (the most simple way is to generate it in filter), looks like OSCache has filter implementation for this use case.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.