123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?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:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
- default-autowire="byName" default-lazy-init="true">
-
- <bean id="dataSource2" class="com.jolbox.bonecp.BoneCPDataSource"
- destroy-method="close">
- <property name="driverClass" value="${jdbc2.driverClassName}" />
- <property name="jdbcUrl" value="${jdbc2.url}" />
- <property name="username" value="${jdbc2.username}" />
- <property name="password" value="${jdbc2.password}" />
- <property name="idleConnectionTestPeriod" value="${cpool.idleConnectionTestPeriod}" />
- <property name="idleMaxAge" value="${cpool.idleMaxAge}" />
- <property name="maxConnectionsPerPartition" value="${cpool.maxConnectionsPerPartition}" />
- <property name="minConnectionsPerPartition" value="${cpool.minConnectionsPerPartition}" />
- <property name="partitionCount" value="${cpool.partitionCount}" />
- <property name="acquireIncrement" value="${cpool.acquireIncrement}" />
- <property name="statementCacheSize" value="${cpool.statementCacheSize}" />
- <property name="releaseHelperThreads" value="${cpool.releaseHelperThreads}" />
- <property name="connectionTimeout" value="60000"></property>
- </bean>
- <aop:config proxy-target-class="true">
- <aop:pointcut id="sqlServiceOperation"
- expression="execution(* com.gyee*.service..*SqlService.*(..))" />
- <aop:pointcut id="sqlJdbcDao"
- expression="execution(* com.gyee.dao.SqlGenericJdbcDao.*(..))" />
- <aop:advisor pointcut-ref="sqlServiceOperation" advice-ref="txAdvice2"
- order="1" />
- <aop:advisor pointcut-ref="sqlJdbcDao" advice-ref="txAdvice2"
- order="2" />
- </aop:config>
- <bean id="transactionManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource">
- <ref bean="dataSource2" />
- </property>
- </bean>
- <tx:advice id="txAdvice2" transaction-manager="transactionManager">
- <tx:attributes>
- <tx:method name="get*" read-only="true" rollback-for="Exception" />
- <tx:method name="find*" read-only="true" rollback-for="Exception" />
- <tx:method name="load*" read-only="true" rollback-for="Exception" />
- <tx:method name="unique*" read-only="true" rollback-for="Exception" />
- <tx:method name="*" rollback-for="Exception" />
- </tx:attributes>
- </tx:advice>
- <aop:aspectj-autoproxy proxy-target-class="true" />
- </beans>
|