--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+ <!-- Transaction -->
+ <bean id="hibernateTransactionManager"
+ class="org.springframework.orm.hibernate3.HibernateTransactionManager"
+ lazy-init="false">
+ <property name="sessionFactory" ref="sessionFactory" />
+ </bean>
+
+ <!-- DAO transactions -->
+ <aop:config>
+ <aop:pointcut id="daoProcessMethods"
+ expression="execution(* org.argeo.slc.dao.process.*.*(..))" />
+ <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoProcessMethods" />
+ </aop:config>
+
+ <aop:config>
+ <aop:pointcut id="daoRuntimeMethods"
+ expression="execution(* org.argeo.slc.dao.runtime.*.*(..))" />
+ <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoRuntimeMethods" />
+ </aop:config>
+
+ <aop:config>
+ <aop:pointcut id="daoTestMethods"
+ expression="execution(* org.argeo.slc.dao.test.*.*(..))" />
+ <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoTestMethods" />
+ </aop:config>
+
+ <aop:config>
+ <aop:pointcut id="daoTestTreeMethods"
+ expression="execution(* org.argeo.slc.dao.test.tree.*.*(..))" />
+ <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoTestTreeMethods" />
+ </aop:config>
+
+ <tx:advice id="daoAdvice" transaction-manager="hibernateTransactionManager">
+ <tx:attributes>
+ <tx:method name="get*" propagation="REQUIRED" read-only="true" />
+ <tx:method name="list*" propagation="REQUIRED" read-only="true" />
+ <tx:method name="*" propagation="REQUIRED" />
+ </tx:attributes>
+ </tx:advice>
+
+ <aop:config>
+ <aop:pointcut id="pointcut.services.allMethods"
+ expression="execution(* org.argeo.slc.services.*.*.*(..))" />
+ <aop:advisor advice-ref="advice.allMethodsRequired"
+ pointcut-ref="pointcut.services.allMethods" />
+ </aop:config>
+
+ <tx:advice id="advice.allMethodsRequired"
+ transaction-manager="hibernateTransactionManager">
+ <tx:attributes>
+ <tx:method name="*" propagation="REQUIRED" />
+ </tx:attributes>
+ </tx:advice>
+
+</beans>
\ No newline at end of file