-->
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: Annotations and EHCache
PostPosted: Tue Nov 08, 2005 7:19 am 
Beginner
Beginner

Joined: Mon Sep 12, 2005 3:27 am
Posts: 48
Hello,

what is the "org.hibernate.annotations.Cache" annotation for - can i configure this way the ehcache 2nd level cache ? Or does this annotation simply configure only the hibernate 1st level cache....

My goal is to configure ehcache with annotations and without ehcache.xml.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 1:07 pm 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
1st level cache is your current session.
When we talk about caching in Hibernate, we normaly mean 2nd level cache, since that is the 'real' cache. So the annotation applies to that one - 2nd.

ehcache.xml and annotation have no relation between them.

First one tells EhCache how it should cache stuff, the second one tells Hibernate how to deal with annotated entity regarding caching.

Quote:
My goal is to configure ehcache with annotations and without ehcache.xml.


Then change/add Ehcache code.[/quote]


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.