Important properties in hibernate configuration file

There are mainly six important tags for hibernate configuration file. Hibernate configuration file naming convension is generally hibernate.cfg.xml and it is generally placed in the classpath. This can also be configured in the file. If both hibernate.cfg.xml and are found in the classpath then hibernate.cfg.xml overrides file.

Read More

Different types of cache strategies in Hibernate

Hibernate uses two different caches for objects: first-level cache and second-level cache. First-level cache is associated with the Session object, while second-level cache is associated with the SessionFactory object. By default, Hibernate uses first-level cache on a per-transaction basis. Hibernate uses this cache mainly to reduce the number of SQL queries it needs to generate […]

Read More

1 2