Data access framework
Spring's data access framework addresses common difficulties
developers face when working with databases in applications. Support is
provided for all popular data access frameworks in Java: JDBC, iBatis/MyBatis, Hibernate, JDO, JPA, Oracle TopLink, Apache OJB, and Apache Cayenne, among others.For all of these supported frameworks, Spring provides these features
Together with Spring's transaction management, its data access framework offers a flexible abstraction for working with data access frameworks. The Spring Framework doesn't offer a common data access API; instead, the full power of the supported APIs is kept intact. The Spring Framework is the only framework available in Java that offers managed data access environments outside of an application server or container.
While using Spring for transaction management with Hibernate, the following beans may have to be configured:
- Resource management - automatically acquiring and releasing database resources
- Exception handling - translating data access related exception to a Spring data access hierarchy
- Transaction participation - transparent participation in ongoing transactions
- Resource unwrapping - retrieving database objects from connection pool wrappers
- Abstraction for BLOB and CLOB handling
Together with Spring's transaction management, its data access framework offers a flexible abstraction for working with data access frameworks. The Spring Framework doesn't offer a common data access API; instead, the full power of the supported APIs is kept intact. The Spring Framework is the only framework available in Java that offers managed data access environments outside of an application server or container.
While using Spring for transaction management with Hibernate, the following beans may have to be configured:
- A Data Source like
com.mchange.v2.c3p0.ComboPooledDataSource
ororg.apache.commons.dbcp.BasicDataSource
- A SessionFactory like
org.springframework.orm.hibernate3.LocalSessionFactoryBean
with a DataSource attribute - A HibernateProperties like
org.springframework.beans.factory.config.PropertiesFactoryBean
- A TransactionManager like
org.springframework.orm.hibernate3.HibernateTransactionManager
with a SessionFactory attribute
Comments
Post a Comment