cache « EJB « JPA Q&A

1. @Cache annotation usage error

I added the following annotation to enable cache to one of my EJB3 entities, to test caching with ehCache, where I use Hibernate as the persistence provider:

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Table(name = "F")
@NamedQueries({ ...

2. Caching EJB entities using JBoss Hibernate cache (JBoss-5.0.0.GA)

My applications very often queries database for rarely-changed data. So I've decided to optimize it using cached EJB entities as desribed in: However, when I take a look at hibernate ...

3. Cache JPA Entities with EJB

[The real question is marked in bold down. Here follows an as short as possible explaination of my situation] I have the following JPA Entities:

@Entity Genre{
 private String name;
 @OneToMany(mappedBy = "genre", ...