123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?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="propertyCOnfigurer"
- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="location">
- <value>classpath:dbconfig.properties</value>
- </property>
- </bean>
-
- <bean id="propertyCfg" class="com.gyee.intial.PropertyCacheContext">
- <property name="ignoreResourceNotFound" value="true" />
- <property name="locations">
- <list>
- <value>classpath:webconfig.properties</value>
- </list>
- </property>
- </bean>
-
- <bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource"
- destroy-method="close">
- <property name="driverClass" value="${jdbc.driverClassName}" />
- <property name="jdbcUrl" value="${jdbc.url}" />
- <property name="username" value="${jdbc.username}" />
- <property name="password" value="${jdbc.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>
- <bean id="sequence"
- class="org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer">
- <property name="incrementerName" value="SQ_ID" />
- <property name="dataSource" ref="dataSource" />
- </bean>
- <aop:config proxy-target-class="true">
- <aop:pointcut id="serviceOperation"
- expression="execution(* com.gyee.service..*Service.*(..))" />
- <aop:advisor pointcut-ref="serviceOperation" advice-ref="txAdvice"
- order="1" />
- </aop:config>
-
- <bean id="transactionManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource">
- <ref bean="dataSource" />
- </property>
- </bean>
- <tx:advice id="txAdvice" 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>
|