Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cache usage = "read-only "

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If a Collection is marked to cache usage = "read-only " on to the hbm files .

And if this Collection is updated will the Hibernate Framework throw any Exception . Please tell me .

Simply the Question is :

what happens if one set cache usage = "read-only " and do an update on the Entity ?


 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody please.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happened when you tried using it?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works fin

It works but whenever an Entity is modified in Database the cache will be not updated .


I just want to confirm so posted here
 
Kadle Rajesh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think any exception will be thrown.

But as we are declaring the cache read-only, the object in cache will NEVER be invalidated.

Welcome other views....
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


invalidated or not invalidated depends on the parameter you used in the second level cache ( say maxtimetolive in ehcache.xml incase of EHCache ).

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic