]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/server/spring/transaction.xml
Introduce list results attributes
[gpl/argeo-slc.git] / runtime / org.argeo.slc.server / src / main / resources / org / argeo / slc / server / 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"
4 xmlns:aop="http://www.springframework.org/schema/aop"
5 xmlns:tx="http://www.springframework.org/schema/tx"
6 xsi:schemaLocation="
7 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
8 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
9 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
10
11 <!-- Transaction -->
12 <bean id="transactionManager"
13 class="org.springframework.orm.hibernate3.HibernateTransactionManager"
14 lazy-init="false">
15 <property name="sessionFactory" ref="sessionFactory" />
16 </bean>
17
18 <!-- DAO transactions -->
19 <aop:config>
20 <aop:pointcut id="daoProcessMethods"
21 expression="execution(* org.argeo.slc.dao.process.*.*(..))" />
22 <aop:advisor advice-ref="daoAdvice"
23 pointcut-ref="daoProcessMethods" />
24 </aop:config>
25
26 <aop:config>
27 <aop:pointcut id="daoTestMethods"
28 expression="execution(* org.argeo.slc.dao.test.*.*(..))" />
29 <aop:advisor advice-ref="daoAdvice"
30 pointcut-ref="daoTestMethods" />
31 </aop:config>
32
33 <aop:config>
34 <aop:pointcut id="daoTestTreeMethods"
35 expression="execution(* org.argeo.slc.dao.test.tree.*.*(..))" />
36 <aop:advisor advice-ref="daoAdvice"
37 pointcut-ref="daoTestTreeMethods" />
38 </aop:config>
39
40 <tx:advice id="daoAdvice"
41 transaction-manager="transactionManager">
42 <tx:attributes>
43 <tx:method name="get*" propagation="REQUIRED"
44 read-only="true" />
45 <tx:method name="list*" propagation="REQUIRED"
46 read-only="true" />
47 <tx:method name="*" propagation="REQUIRED" />
48 </tx:attributes>
49 </tx:advice>
50
51 </beans>