Bidirectional Many-To-One/One-To-Many Relationship in Hibernate

In bidirectional association, we will have navigations in both direction, i.e, both side of the association will have the reference to the other side. The both side of the association will implement one of the collection interfaces, if it has the reference to the other entity. In many-to-one/one-to-many relationship, multiple Continue Reading…

Second Level OSCache example in Hibernate

This tutorial will sow how we can configure second level cache using OSCache in Hibernate step by step. We know that there are three types of caching mechanism in Hibernate such as First Level – Session, Second Level – SessionFactory and Query Level – SessionFactory. For more information on First Continue Reading…

Second level EHCache example in Hibernate

This tutorial will sow how we can configure second level cache using ehcache in Hibernate step by step. EH stands for Easy Hibernate. We know that tehre are three types of caching mechanism such as First Level – session, Second Level – SessionFactory and Query Level – SessionFactory. For more Continue Reading…

Criteria API example in Hibernate

Criteria is a simplified API for retrieving entities by composing Criterion objects. This is a very convenient approach for functionality like “search” screens where there is a variable number of conditions to be placed upon the result set. The following example shows how to work with Hibernate Criteria API. Criteria Continue Reading…

Integrate Spring 3, Struts 2 and Hibernate 3

This tutorial shows how to integrate Spring 3, Struts2 and Hibernate 3 in the following example. You can see also Struts 2, Spring 4, Hibernate 4 and Maven Integration Download the required jars for Spring from https://spring.io, Struts from http://struts.apache.org/download.cgi#struts2316 and Hibernate from http://hibernate.org/orm/downloads/ Create web application using Eclipse or Continue Reading…