-->
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: Looking for details/src code for hibernate + ehcache config
PostPosted: Wed Jun 16, 2010 4:17 pm 
Newbie

Joined: Mon Apr 14, 2008 1:13 pm
Posts: 11
So obviously when you enable 2nd level caching with ehcache, Hibernate will go through all your entity classes and create a bunch of ehcache instances based on the annotations / metadata defined for those classes.

I'm looking for insight into the low level details of how Hibernate does that.

For example, if I have a class like this:
Code:
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "Player")
@org.hibernate.annotations.Cache(usage =
   org.hibernate.annotations.CacheConcurrencyStrategy.NONSTRICT_READ_WRITE
)
public class BasketballPlayer {

        @ManyToOne(fetch = FetchType.EAGER)
   @JoinColumn(name = "team_id")
   @org.hibernate.annotations.Cache(usage =
      org.hibernate.annotations.CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
   private BasketballTeam team;

       .... non-relevant stuff omitted ...
}


I'm looking for the Hibernate code that inspects this class and creates the ehcache instances + relationships between BasketballPlayer and BaskeballTeam (from seeing the @Entity, @Cache and @ManyToOne annotations).

Can someone help me out and point me in the right direction?


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.