• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is an in-memory object?

 
prakash Venugopal
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Hibernate. I dont know what is in-memory objects? how hibernate manages the persistence? in what sense...can any one explain??
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is really a bigger question than you probably realize. Basically it comes down to understanding the persistence context. A persistence context represents the state of persistent objects that Hibernate is tracking. If the persistence context participates in a transaction, the in-memory state of the managed entities will get synchronized with/to the database.
 
surendra babu k
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically Hibernate contains 2 levels of cache...one is session level cache and another is SessionFactory level cache. By default hibernate uses session level cache in that every session internally maintains a cache. session level cache uses in-memory objects.i.e it will get the objects from the DB and maintain them in Memory possibly takes a less amount of space..

Where as in second level cache SessionFactory maintains one cache for multiple sessions...so to maintain all the sessions data in memory is may cause to create some IO problems......So, to over come this all the data from all the session is maintained in Disk....but not in-memory...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic