Vikings

          簡化spring中的事務(wù)管理配置(ZT)

          <!-- Transactional proxy for the services -->  
              
          <bean id="baseTxProxy" lazy-init="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">  
                  
          <property name="transactionManager"><ref bean="transactionManager"/></property>  
                  
          <property name="transactionAttributes">  
                      
          <props>  
                          
          <prop key="*">PROPAGATION_REQUIRED</prop>  
                      
          </props>  
                  
          </property>  
              
          </bean>  
            
              
          <bean id="itemService" parent="baseTxProxy">  
                  
          <property name="target">  
                      
          <bean class="ItemServiceImpl" autowire="byName"/>  
                  
          </property>  
              
          </bean>  
          這樣的話baseTxProxy也可能被實例化。是不是加上abstract="true"屬性,把baseTxProxy只是當(dāng)作一個模板比較好?因為只需要itemservice這個bean。

          posted on 2008-08-07 00:12 Vikings 閱讀(304) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 肇州县| 台南县| 门源| 河北区| 营山县| 台北县| 临西县| 吉林市| 怀安县| 天祝| 定兴县| 察隅县| 工布江达县| 团风县| 韶关市| 沁水县| 尼木县| 调兵山市| 高唐县| 石楼县| 泌阳县| 柞水县| 苏尼特左旗| 叶城县| 连平县| 桑日县| 交口县| 都匀市| 中超| 龙南县| 延津县| 黔西县| 华阴市| 镇坪县| 岚皋县| 稻城县| 邵阳市| 南城县| 富裕县| 屏东市| 东明县|