我们来自五湖四海,不为别的,只因有共同的爱好,为中国互联网发展出一分力!

j2se中框架spring的事物配置

2011年12月31日11:07 阅读: 23353 次

标签: Java, 框架, spring

01 "1.0" encoding="UTF-8"?>
02 ?
03 "http://www.springframework.org/schema/beans"
04 ??????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
05 ??????xmlns:aop="http://www.springframework.org/schema/aop"
06 ??????xmlns:tx="http://www.springframework.org/schema/tx"
07 ??????xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
08 ???????????http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
09 ???????????http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
10 ?
11 ?"sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
12 ??"configLocation">
13 ???classpath:hibernate.cfg.xml
14 ??
15 ???????????
16 ??
17 ?
18 ?"transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
19 ??"sessionFactory">
20 ???"sessionFactory"/>
21 ??
22 ?
23 ??
24 ?
25 ?"txAdvice" transaction-manager="transactionManager">
26 ??
27 ???"add*" propagation="REQUIRED"/>
28 ???"del*" propagation="REQUIRED"/>
29 ???"modify*" propagation="REQUIRED"/>
30 ???"*" read-only="true"/>
31 ??
32 ?
33 ??
34 ?
35 ?
36 ??"allManagerMethod" expression="execution(* xxx.xxx.*.*(..))"/>
37 ??"allManagerMethod" advice-ref="txAdvice"/>
38 ?
39
分享到: 更多
蓝客门户