12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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 class="com.hcks.cmfds.core.security.SecurityAuthentication"
- init-method="init" lazy-init="false">
- <property name="authKey" value=".WEB_AUTH_KEY"></property>
- <property name="key" value="windcmfds"></property>
- </bean>
- <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.hcks.cmfds.service.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="600000"></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.hcks.cmfds*.service..*Service.*(..))" />
- <aop:pointcut id="JdbcDao"
- expression="execution(* com.hcks.cmfds.core.persistence.GenericJdbcDao.*(..))" />
- <aop:advisor pointcut-ref="serviceOperation" advice-ref="txAdvice"
- order="1" />
- <aop:advisor pointcut-ref="JdbcDao" advice-ref="txAdvice"
- order="2" />
- </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>
|