</bean>
<bean class="org.argeo.slc.ws.CustomSoapExceptionResolver" />
-
- <!-- Transaction -->
-
+
+ <!-- Web Services transactions -->
<aop:config>
<aop:pointcut id="epMethods"
expression="execution(* org.springframework.ws.server.endpoint.MessageEndpoint.invoke(..))" />
<tx:advice id="epAdvice" transaction-manager="transactionManager">
<tx:attributes>
- <tx:method name="*" propagation="REQUIRES_NEW" />
+ <tx:method name="*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>
-
</beans>
\ No newline at end of file
--- /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="transactionManager"
+ 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="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="transactionManager">
+ <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>
+
+</beans>
\ No newline at end of file