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)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 卢湾区| 五华县| 房产| 潜江市| 仙桃市| 衡水市| 岱山县| 比如县| 柳州市| 红河县| 西宁市| 读书| 马边| 新晃| 收藏| 昭觉县| 贵定县| 汕头市| 遂川县| 汾西县| 荔波县| 神农架林区| 开远市| 襄樊市| 青岛市| 通化县| 富民县| 高要市| 高台县| 福泉市| 桐柏县| 商河县| 乾安县| 文山县| 赣榆县| 卢湾区| 舒城县| 仪征市| 怀化市| 仁化县| 南川市|