View RSS Feed

Hibernate

Spring and Hibernate

  1. Configuring a Hibernate SessionFactory in Spring

    by , 11-27-2011 at 10:11 PM
    In an earlier post, I showed you how to integrate Hibernate with Spring using the annotation oriented persistence. For those still interested in the standard way I outline how you can accomplish that below. The key to the standard way is to use a Hibernate org.hibernate.SessionFactory for all access to the database through the domain objects. The Java configuration for the SessionFactory is shown below.

    Java Code:
    package com.acme.springexamples.car.dao.config;
    import org.springframework.beans.factory.annotation.Value;
    ...
    Tags: hibernate Add / Edit Tags
    Categories
    Hibernate , Configuration , Spring 3
  2. Using Spring Data Access Support with Hibernate

    by , 11-27-2011 at 09:35 PM
    In our previous tip, I gave an introduction to Spring’s persistence technology agnostic approach to data access. In this tip, we will show you how to use Spring with one of the most popular persistence technologies, Hibernate. Hibernate is an open source persistence framework that is one of the most successful persistence frameworks in the developer community. The reason for this is that it is a full featured object relational mapping (ORM) tool. It provides all the features you’d expect from a ...
  3. Using Spring with Hibernate

    by , 11-16-2011 at 05:43 PM
    In our previous tip, I gave an introduction to Spring’s persistence technology agnostic approach to data access. In this tip, we will show you how to use Spring with one of the most popular persistence technologies, Hibernate. Hibernate is an open source persistence framework that is one of the most successful persistence frameworks in the developer community. The reason for this is that it is a full featured object relational mapping (ORM) tool. It provides all the features you’d expect from a ...
    Categories
    Hibernate
  4. Database Support in Spring

    by , 11-16-2011 at 05:40 PM
    In our next tip, I will focus on Spring’s data access support. Spring uses the design pattern, data access object (DAO). The purpose of DAOs is to provide means to read and write data to the database. So what Spring has focused on is to make it easy for developers to write DAOs as irrespective of whether you use JDBC, Hibernate, JPA or JDO. The way in which it does this is by separating the interface from the data access implementation. Therefore the implementation can change to align with the ...
    Categories
    JPA , Hibernate , JDBC