-->
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: Hibernate in Action left me guessing about caching...
PostPosted: Fri May 06, 2005 12:44 am 
Beginner
Beginner

Joined: Fri Apr 29, 2005 10:57 pm
Posts: 41
Hibernate version: 3.0.2

After reading chapter 5 on caching, I'm pretty confused about what to put in the <cache name=""> in ehcache.xml...

The book doesn't explicitly say anything about it, I can only guess from the example that whatever the full class name is - that should go into cache name="" and that confiruation will apply to all instances of that class..

Am I correct on that one?


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 4:22 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
All the names involved with cache are region names.
Each part of the cache has its own region name.
By default Hibernate sets region name to entity name (class name).
So then you also set the (region) name in ehcache the same way.
But you could say what ever you want:

In hbm.xml:
<cache usage="..." region="foo.tralala">
In ehcache.xml:
<cache name="foo.tralala">


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 4:22 pm 
Beginner
Beginner

Joined: Fri Apr 29, 2005 10:57 pm
Posts: 41
so if I don't use the region="" parameter, then it's the class name by default?


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.