sshah
Jul 18th, 2011, 03:50 PM
Hello,
I am having a problem with controlling when a transaction is committed in the situation below. I two services - Synchronization and DefaultProvisioning
Synchronization calls methods on the DefaultProvisioning service. The issue is that I would like to see commits occur when each method on the DefaultProvisioning service completes. Instead they are occuring then the Synchronization service method completes.
Is there any way that I can control this behavior?
The settings for the AOP config are below.
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransa ctionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true" propagation="SUPPORTS" />
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*" propagation="REQUIRED" rollback-for="RuntimeException"/>
<tx:method name="send*" read-only="true" propagation="NOT_SUPPORTED" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="defaultProvisionOperation" expression="execution(* org.openiam.provision.service.DefaultProvisioningS ervice.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="defaultProvisionOperation"/>
</aop:config>
<aop:config>
<aop:pointcut id="synchServiceWSOperation" expression="execution(* org.openiam.idm.srvc.synch.ws.IdentitySynchWebServ iceImpl.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="synchServiceWSOperation"/>
</aop:config>
I am having a problem with controlling when a transaction is committed in the situation below. I two services - Synchronization and DefaultProvisioning
Synchronization calls methods on the DefaultProvisioning service. The issue is that I would like to see commits occur when each method on the DefaultProvisioning service completes. Instead they are occuring then the Synchronization service method completes.
Is there any way that I can control this behavior?
The settings for the AOP config are below.
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransa ctionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true" propagation="SUPPORTS" />
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*" propagation="REQUIRED" rollback-for="RuntimeException"/>
<tx:method name="send*" read-only="true" propagation="NOT_SUPPORTED" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="defaultProvisionOperation" expression="execution(* org.openiam.provision.service.DefaultProvisioningS ervice.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="defaultProvisionOperation"/>
</aop:config>
<aop:config>
<aop:pointcut id="synchServiceWSOperation" expression="execution(* org.openiam.idm.srvc.synch.ws.IdentitySynchWebServ iceImpl.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="synchServiceWSOperation"/>
</aop:config>