permaculture playing cards*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: is it hibernate doing
 
Similar Threads
phantom and dirty read?
JDBC manually commit
Caching in Hibernate
difference between dirty read and phantom
Serializable isolation in EJB