]> git.argeo.org Git - gpl/argeo-slc.git/blob - modules/server/org.argeo.slc.server.hibernate/META-INF/spring/transaction.xml
Revert weird side effect with subversion
[gpl/argeo-slc.git] / modules / server / org.argeo.slc.server.hibernate / META-INF / spring / transaction.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
4 xmlns:tx="http://www.springframework.org/schema/tx"
5 xsi:schemaLocation="
6 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
7 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
8 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
9
10 <!-- Transaction -->
11 <bean id="hibernateTransactionManager"
12 class="org.springframework.orm.hibernate3.HibernateTransactionManager"
13 lazy-init="false">
14 <property name="sessionFactory" ref="sessionFactory" />
15 </bean>
16
17 <!-- DAO transactions -->
18 <aop:config>
19 <aop:pointcut id="daoProcessMethods"
20 expression="execution(* org.argeo.slc.dao.process.*.*(..))" />
21 <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoProcessMethods" />
22 </aop:config>
23
24 <aop:config>
25 <aop:pointcut id="daoRuntimeMethods"
26 expression="execution(* org.argeo.slc.dao.runtime.*.*(..))" />
27 <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoRuntimeMethods" />
28 </aop:config>
29
30 <aop:config>
31 <aop:pointcut id="daoTestMethods"
32 expression="execution(* org.argeo.slc.dao.test.*.*(..))" />
33 <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoTestMethods" />
34 </aop:config>
35
36 <aop:config>
37 <aop:pointcut id="daoTestTreeMethods"
38 expression="execution(* org.argeo.slc.dao.test.tree.*.*(..))" />
39 <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoTestTreeMethods" />
40 </aop:config>
41
42 <tx:advice id="daoAdvice" transaction-manager="hibernateTransactionManager">
43 <tx:attributes>
44 <tx:method name="get*" propagation="REQUIRED" read-only="true" />
45 <tx:method name="list*" propagation="REQUIRED" read-only="true" />
46 <tx:method name="*" propagation="REQUIRED" />
47 </tx:attributes>
48 </tx:advice>
49
50 <aop:config>
51 <aop:pointcut id="pointcut.services.allMethods"
52 expression="execution(* org.argeo.slc.services.*.*.*(..))" />
53 <aop:advisor advice-ref="advice.allMethodsRequired"
54 pointcut-ref="pointcut.services.allMethods" />
55 </aop:config>
56
57 <tx:advice id="advice.allMethodsRequired"
58 transaction-manager="hibernateTransactionManager">
59 <tx:attributes>
60 <tx:method name="*" propagation="REQUIRED" />
61 </tx:attributes>
62 </tx:advice>
63
64 </beans>