2011-04-18 117 views
0

我有一個擴展這個txProxyTemplate的bean,在它裏面,這個方法orderUpdateOverseer調用getHibernateTemplate()。saveOrUpdate(someObject);休眠txProxyTemplate和聲明交易

private void orderUpdateOverseer(OrderReturnState orderReturnState) throws ReturnsOrderUpdateException 

我注意到,休眠刷新更新到數據庫中,只有當我完全退出該延長線插頭txProxyTemplate在做這對我已宣佈要在新的交易方法orderUpdateOverseer的出口的豆。這是爲什麼?我究竟做錯了什麼?

<bean id="txProxyTemplate" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> 
    <property name="transactionManager" ref="hibernateTransactionMgr" /> 
    <property name="transactionAttributes"> 
     <props> 
      <prop key="getAmos*">PROPAGATION_REQUIRED,readOnly</prop> 
      <prop key="orderUpdateOverseer">PROPAGATION_REQUIRES_NEW</prop> 
      <prop key="recordProcessOverseer">PROPAGATION_REQUIRED,readOnly</prop> 
      <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop> 
      <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop> 
      <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop> 
      <prop key="save*">PROPAGATION_REQUIRED</prop> 
      <prop key="update*">PROPAGATION_REQUIRED</prop> 
      <prop key="store*">PROPAGATION_REQUIRED</prop> 
      <prop key="merge*">PROPAGATION_REQUIRED</prop> 
      <prop key="split*">PROPAGATION_REQUIRED</prop> 
      <prop key="receive*">PROPAGATION_REQUIRED</prop> 
      <prop key="*">PROPAGATION_REQUIRED</prop> 
     </props> 
    </property> 
</bean> 

回答