<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    少年阿賓

    那些青春的歲月

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      500 Posts :: 0 Stories :: 135 Comments :: 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="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
            destroy-method="close">
            <property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
            <property name="url" value="jdbc:mysql://localhost:3306/abin"></property>
            <property name="username" value="root"></property>
            <property name="password" value="root"></property>
            <property name="maxActive" value="100"></property>
            <property name="maxIdle" value="30"></property>
            <property name="maxWait" value="500"></property>
            <property name="defaultAutoCommit" value="true"></property>
        </bean>

        <!-- session工廠 -->
        <bean id="sessionFactory"
            class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
            <property name="dataSource" ref="dataSource"></property>
            <property name="hibernateProperties">
                <props>
                    <prop key="hibernate.dialect">
                        org.hibernate.dialect.MySQLDialect    
                    </prop>
                    <prop key="hibernate.show_sql">true</prop>
                    <prop key="hibernate.format_sql">true</prop>
                    <prop key="hibernate.hbm2ddl.auto">update</prop>
                </props>
            </property>
            <property name="mappingResources">
                <list>
                    <value>com/abin/conference/hbm/ConferenceBean.hbm.xml</value>
                </list>
            </property>
        </bean>

        <!-- 事務管理器 -->
        <bean id="transactionManager"
            class="org.springframework.orm.hibernate3.HibernateTransactionManager">
            <property name="sessionFactory">
                <ref local="sessionFactory" />
            </property>
        </bean>

        <!-- 定義攔截器 -->
        <bean id="transactionInterceptor"
            class="org.springframework.transaction.interceptor.TransactionInterceptor">
            <property name="transactionManager">
                <ref bean="transactionManager"></ref>
            </property>
            <property name="transactionAttributes">
                <props>
                    <prop key="insert*">PROPAGATION_REQUIRED,ISOLATION_READ_COMMITTED,timeout_10,-EXCEPTION</prop>
                    <prop key="del*">PROPAGATION_REQUIRED</prop>
                    <prop key="update*">PROPAGATION_REQUIRED</prop>
                    <prop key="find">PROPAGATION_REQUIRED</prop>
                    <prop key="get">PROPAGATION_REQUIRED</prop>
                </props>
            </property>
        </bean>

        <!-- 定義業務對象的事務代理對象 -->
        <bean id="userService" class="org.springframework.aop.framework.ProxyFactoryBean">
            <property name="target" ref="userServiceTarget"></property>
            <property name="interceptorNames">
                <value>transactionInterceptor</value>
            </property>
        </bean>





        <!-- 配置事務特性,配置add,delete,update開始的方法,事務傳播特性為required -->
        <!--
        <tx:advice id="txAdvice" transaction-manager="transactionManager">
            <tx:attributes>
                <tx:method name="add*" propagation="REQUIRED" />
                <tx:method name="delete*" propagation="REQUIRED" />
                <tx:method name="update*" propagation="REQUIRED" />
                <tx:method name="*" read-only="true" />
            </tx:attributes>
        </tx:advice>
        -->
        <!--
        <aop:config>
            <aop:pointcut id="allManagerMethod"
                expression="execxution(*
            com.abin.conference.service.*.*(..))"></aop:pointcut>
            <aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod"></aop:advisor>
        </aop:config>
        -->
    </beans>
    posted on 2012-03-19 23:53 abin 閱讀(514) 評論(0)  編輯  收藏

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


    網站導航:
     
    主站蜘蛛池模板: 999国内精品永久免费视频| 无码毛片一区二区三区视频免费播放 | 国产美女被遭强高潮免费网站| 国产亚洲美女精品久久| 久久91亚洲人成电影网站| 91福利免费视频| 深夜a级毛片免费视频| 亚洲AV无码国产精品色午友在线 | 国产亚洲人成在线影院| 亚洲AV中文无码字幕色三| 久久久久久99av无码免费网站 | 亚洲av永久无码精品天堂久久 | 99精品视频免费观看| tom影院亚洲国产一区二区| 亚洲成av人片一区二区三区| 99久热只有精品视频免费观看17 | 一二三四在线播放免费观看中文版视频 | 国产亚洲精品bv在线观看| 亚洲无线一二三四区手机| 黄色网址免费观看| www.av在线免费观看| 亚洲一区二区三区播放在线| 亚洲精品成人片在线播放| 国产自产拍精品视频免费看| 1000部拍拍拍18勿入免费凤凰福利| 成人免费午夜无码视频| 久久嫩草影院免费看夜色| 亚洲 欧洲 视频 伦小说| 亚洲国产精品无码专区在线观看| 国产精品免费_区二区三区观看| 免费A级毛片av无码| 国产精品午夜免费观看网站| 亚洲精品久久无码av片俺去也| 日韩亚洲Av人人夜夜澡人人爽 | 亚洲无线码一区二区三区| 三年片在线观看免费观看高清电影 | 国产精品午夜免费观看网站| 亚洲欧美精品午睡沙发| 亚洲国产精品综合久久网各| 亚洲成人动漫在线| 亚洲色偷拍另类无码专区|