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 贺挺 阅读(115) 评论(0)  编辑  收藏

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


网站导航: