my dog learned polymorphism*
The moose likes Object Relational Mapping and the fly likes is it hibernate doing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "is it hibernate doing " Watch "is it hibernate doing " New topic
Author

is it hibernate doing

rama rajesh
Greenhorn

Joined: Jun 22, 2010
Posts: 28
Two applications are fetching the same data from the cache and trying to modify the data.
in this scenario, we will get -->dirty read problems,phantom read problems etc , right?
how hibernate is helping in this scenarios?
Hibernate firstlevel cache, we could not disable. second level only we are disabling.

how hibernate avoiding dirty read problems,phantom read problems etc.




Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Two applications are fetching the same data from the cache and trying to modify the data.

This is only a problem if you are talking about the second level cache and the cache is distributed. Hibernate checks for changes in cached objects.


Hibernate firstlevel cache, we could not disable. second level only we are disabling.

Its not that normal to enable the second level cache. But like I said, unless your cache is distributed this is not an issue. When it comes to distributed cache, cache providers have a bunch of configuration options you can tweak.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
jQuery in Action, 2nd edition
 
subject: is it hibernate doing