Hello Guys ,
Let us explore spring transactions API.
Transaction Management is a part of Data Access.
Let us understand through an example.We will use Hibernate framework in this example for data access. To make spring aware of our this we have to define the bean in spring configuration xml as below:
<bean id="myTxnManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="mySessionFactory"/>
</bean>
<tx:annotation-driver transaction-manager="myTxnManager" >
The use of transaction manager is maintain data consistency.
Let us explore spring transactions API.
Transaction Management is a part of Data Access.
Let us understand through an example.We will use Hibernate framework in this example for data access. To make spring aware of our this we have to define the bean in spring configuration xml as below:
<bean id="myTxnManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="mySessionFactory"/>
</bean>
<tx:annotation-driver transaction-manager="myTxnManager" >
The use of transaction manager is maintain data consistency.
No comments:
Post a Comment