Detailed transaction configuration in SSH (each bean has one agent)

Source: Internet
Author: User
Tags aop ssh
<?xml version= "1.0" encoding= "UTF-8"?> <beans "xmlns=" xmlns:
    Xsi= "Http://" xmlns:context= "Http://" xmlns:aop= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP" xsi:schemalocation= "Http:// /beans http://www.springframework. Org/schema/context HTTP://WWW.S PRINGFRAMEWORK.ORG/SCHEMA/AOP "> <bean id=" Sessionfactory "class=" Org.springframework.orm.hibernate3.LocalSessionFactoryBean "> <propert Y name= "configlocation" value= "Classpath:hibernate.cfg.xml"/> <property name= "ConfigurationClass" Org.hibernate.cfg.AnnotationConfiguration "/>
    </bean> <!--define the transaction manager (declarative transaction)--> <bean id= "TransactionManager class=" ORG.SPRINGF Ramework.orm.hibernate3.HibernateTransactionManager "> <property name=" sessionfactory "ref=" Sessionfactory " > </bean> <!--Configure DAO--> <bean id= "Userdaotarget class=" Com.bluesky.spring.dao.UserDao Impl "> <property name=" sessionfactory "ref=" sessionfactory "/> </bean> <bean id=" us Erdao "class=" Org.springframework.transaction.interceptor.TransactionProxyFactoryBean "> <!-- Configure the transaction manager--> <property name= "TransactionManager" ref= "TransactionManager"/> <propert Y name= "target" ref= "Userdaotarget"/> <property name= "proxyinterfaces" value= "Com.bluesky.spring.dao.Gen" Eratordao "/> <!--Configure transaction properties--> <property name=" Transactionattributes "> <p  
             Rops>   <prop key= "*" >PROPAGATION_REQUIRED</prop> </props> </property> < /bean> </beans>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.