element « Cache « JPA Q&A





1. ehcache max-elements on collection    forum.hibernate.org

Hello I'm just considering using ehcache but it's not very clear to me from the docs where the "maxElementsInMemory" setting refers, when being used for a collection association. For example, having an entity Hotel and an association Set and setting "maxElementsInMemory=1000" on the ehcache region "my.package.path.Hotel.roomTypes" does it mean: 1. cache 1000 RoomType references (PKs) for associations of this type? or ...

2.  element    forum.hibernate.org

I intend to use SwarmCache as the Hibernate CacheProvider. According to Hibernate spec: "The element of a class or collection mapping has the following form: transactional|read-write|nonstrict-read-write|read-only" I am interested in nonstrict-read-write option which is suitable for the situation where it is extremely unlikely that two transactions would try to update the same item simultaneously. My question is: what happens if ...

3. Maximum elements per cache?    forum.hibernate.org

4. Loosing Elements in Second Level Cache    forum.hibernate.org

Hi, We are facing problem in Second Level cache. We have observed that whenever below query gets fire, all the elements in Second Level Cache of all the regions get evicted. Total size & elements become zero. String sql = "delete from EmployeeContactRelationship ecr where ecr.teamID in(:teamIDList) and ecr.contactID in(:contactIDList)"; Query query = sessionFactory.getCurrentSession().createQuery( sql ); query.setParameterList("teamIDList", teamIDList); query.setParameterList("contactIDList", contactIDList); query.executeUpdate(); ...