沙漠中的鱼

欲上天堂,先下地狱
posts - 0, comments - 56, trackbacks - 0, articles - 119
  BlogJava :: 首页 ::  :: 联系 :: 聚合  :: 管理

Spirng业务服务层配置事务配置

Posted on 2009-03-11 16:58 沙漠中的鱼 阅读(311) 评论(0)  编辑  收藏 所属分类: 开源框架
<!--Hibernate事务管理配置--> 
  
<bean id="hibernateTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> 
    
<property name="sessionFactory"> 
      
<ref local="sessionFactory"/> 
    
</property> 
  
</bean> 
  
<bean id="hibernateTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" abstract="true"> 
      
<property name="transactionManager" ref="hibernateTransactionManager" /> 
    
<property name="transactionAttributes"> 
        
<props> 
            
<prop key="find*">PROPAGATION_REQUIRED,readOnly </prop> 
            
<prop key="create*">PROPAGATION_REQUIRED,-Exception </prop> 
            
<prop key="delete*">PROPAGATION_REQUIRED,-Exception </prop> 
            
<prop key="update*">PROPAGATION_REQUIRED,-Exception </prop> 
            
<prop key="save*">PROPAGATION_REQUIRED,-Exception </prop> 
            
<prop key="dispatch*">PROPAGATION_REQUIRED </prop> 
            
<prop key="receive*">PROPAGATION_REQUIRED </prop> 
            
<prop key="revert*">PROPAGATION_REQUIRED </prop> 
            
<prop key="*create">PROPAGATION_REQUIRED,-Exception </prop> 
        
</props> 
    
</property> 
    
</bean> 

<!-- /采价任务执行情况    事务在service层/ --> 
<bean id="pcExecuteTaskService" parent="hibernateTransactionProxy"> 
<property name="target"> 
<bean class="com.zdvictory.wjj.pricegather.service.PcExecuteTaskServiceImpl"> 
<property name="pcExecuteTaskDao"> <ref bean="pcExecuteTaskDao" /> </property> 
<property name="pcTaskInfoDao"> <ref bean="pcTaskInfoDao" /> </property> 
<property name="pcCollectionPlaceDao"> <ref bean="pcCollectionPlaceDao" /> </property> 
<property name="pcMerchandiseInfoDao"> <ref bean="pcMerchandiseInfoDao" /> </property> 
<property name="pcParticularTargetDao"> <ref bean="pcParticularTargetDao" /> </property> 
<property name="pcColParticularinfoDao"> <ref bean="pcColParticularinfoDao" /> </property> 
<property name="priceGuideLineDao"> <ref bean="priceGuideLineDao"/> </property> 
<property name="pcMerchandIsClassDao"> <ref bean="pcMerchandIsClassDao"/> </property> 
<property name="logsDao"> <ref bean="logsDao"/> </property> 
</bean> 
</property> 
</bean> 

只有注册用户登录后才能发表评论。


网站导航: