heting

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            40 隨筆 :: 9 文章 :: 45 評論 :: 0 Trackbacks
          <?xml version="1.0" encoding="UTF-8"?>
          <beans xmlns="http://www.springframework.org/schema/beans"
                      xmlns:xsi
          ="http://www.w3.org/2001/XMLSchema-instance"
                      xmlns:aop
          ="http://www.springframework.org/schema/aop"
                      xmlns:tx
          ="http://www.springframework.org/schema/tx"
                      xsi:schemaLocation
          ="
                              http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                              http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
                              http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"
          >
                              
          <bean id="sessionFactory"
                  class
          ="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
                  
          <property name="configLocation"
                      value
          ="classpath:hibernate.cfg.xml">
                  
          </property>
                  
          <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"></property>
              
          </bean>
              
          <bean id="productDao" class="dao.impl.HIbernateProductDaoImpl">
                  
          <property name="sessionFactory" ref="sessionFactory"></property>
              
          </bean>
              
          <bean id="facade" class="facade.Facade">
                  
          <property name="productDao" ref="productDao"></property>
              
          </bean>
              
          <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
                  
          <property name="sessionFactory" ref="sessionFactory"></property>
              
          </bean>
              
              
          <tx:advice id="MethodAdivice" transaction-manager="transactionManager">
                  
          <tx:attributes>
                      
          <tx:method name="selete" read-only="true"/>
                      
          <tx:method name="*" />
                  
          </tx:attributes>
              
          </tx:advice>
              
          <aop:config>
                  
          <aop:pointcut id="aoppoint" expression="execution (* facade.*.*(..))"/>
                  
          <aop:advisor advice-ref="MethodAdivice" pointcut-ref="aoppoint"/>
              
              
          </aop:config>
              
          <bean id="make" class="action.make">
                  
          <property name="facade" ref="facade"></property>
              
          </bean>
              
              
              
              
          </beans>
          posted on 2008-09-17 22:54 賀挺 閱讀(120) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 汪清县| 奎屯市| 会昌县| 楚雄市| 罗山县| 怀化市| 扬州市| 浙江省| 绥阳县| 嘉定区| 墨竹工卡县| 工布江达县| 宣武区| 宜章县| 兴文县| 顺义区| 中西区| 福海县| 神池县| 拜泉县| 尤溪县| 永康市| 东光县| 大厂| 永福县| 吉安县| 沁源县| 吐鲁番市| 弋阳县| 五台县| 广东省| 象山县| 左云县| 建宁县| 太白县| 石河子市| 高邮市| 乐山市| 怀安县| 罗源县| 武清区|