Vikings

          簡化spring中的事務管理配置(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只是當作一個模板比較好?因為只需要itemservice這個bean。

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


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


          網站導航:
           
          主站蜘蛛池模板: 永嘉县| 册亨县| 抚州市| 米泉市| 新营市| 双峰县| 佛冈县| 千阳县| 萝北县| 曲阜市| 泾川县| 正安县| 横山县| 额敏县| 陕西省| 佛山市| 宜黄县| 吉林市| 东乌珠穆沁旗| 渝北区| 浠水县| 开封县| 穆棱市| 融水| 兴宁市| 军事| 漯河市| 玉山县| 车险| 轮台县| 惠来县| 乌鲁木齐县| 巍山| 屏南县| 南丹县| 长寿区| 峨山| 望都县| 开鲁县| 建宁县| 宁国市|