The Second Level Cache in Hibernate : Settings and Configurations.

A Hibernate Session is a transaction-level cache of persistent data. We can configure a cluster or JVM-level (SessionFactory-level) cache on a class-by-class and collection-by-collection basis. We can also plug in a clustered cache into Hibernate. At the time of providing cache we need to understand that when we are updating the persistence DB it willContinue reading “The Second Level Cache in Hibernate : Settings and Configurations.”

List of Cache Providers in Hibernate and their Concurrency Support details

Here in this port you can find the list of Cache providers and their Concurrency support details. (Exerted from Official Hibernate Tutorial) EHCache (Easy Hibernate Cache) (org.hibernate.cache.EhCacheProvider) It is fast. lightweight. Easy-to-use. Supports read-only and read/write caching. Supports memory-based and disk-based caching. Does not support clustering. OSCache (Open Symphony Cache) (org.hibernate.cache.OSCacheProvider) It is a powerfulContinue reading “List of Cache Providers in Hibernate and their Concurrency Support details”

Hibernate generator classes

Extracted from Hibernate online official tutorials In Hibernate the optional <generator> child element names a Java class used to generate unique identifiers for instances of the persistent class. If any parameters are required to configure or initialize the generator instance, they are passed using the <param> element. <id name=”id” type=”long” column=”cat_id”> <generator class=”org.hibernate.id.TableHiLoGenerator”> <param name=”table”>uid_table</param>Continue reading “Hibernate generator classes”

Advantages of Hibernate

Caching objects. The session is a transaction-level cache of persistent objects. You may also enable a JVM-level/cluster cache to memory and/or local disk. Executing SQL statements later, when needed. The session never issues an INSERT or UPDATE until it is actually needed. So if an exception occurs and you need to abort the transaction, someContinue reading “Advantages of Hibernate”