Friday, July 22, 2016

Spring Transactions

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.


No comments:

Post a Comment

Gen AI Interview

 Langchain vs LangGraph For RAG ingestion what you have used lang chain or lang graph For the  RAG ingestion pipeline , I use  LangChain , n...