There are two ways to access hibernate using spring:
- Inversion of Control with a Hibernate Template and Callback.
- Extending HibernateDAOSupport and Applying an AOP Interceptor node.
With use of Spring JDBC framework the burden of resource management and error handling is reduced a lot. So it leaves developers to write the statements and queries to get the data to and from the database. JdbcTemplate provides many convenience methods for doing things such as converting database data into primitives or objects, executing prepared and callable statements, and providing custom database error handling.
|