spring.xml
2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?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:sca="http://www.springframework.org/schema/sca" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
<!-- default datasource -->
<bean id="DefaultDataSource" class="com.eos.spring.DASDataSource">
<property name="dataSourceName">
<value>default</value>
</property>
</bean>
<!-- default transaction manager -->
<bean id="DefaultTransactionManager" class="com.primeton.spring.DASTransactionManager">
<property name="dataSource">
<ref bean="DefaultDataSource"/>
</property>
</bean>
<!-- default transaction policy -->
<bean id="DefaultNamingTransactionAttribute" class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource">
<property name="properties">
<props>
<prop key="add*">PROPAGATION_REQUIRED</prop>
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="create*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="remove*">PROPAGATION_REQUIRED</prop>
<prop key="query*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
<!-- default transaction proxy -->
<bean id="DefaultBaseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" abstract="true">
<property name="proxyTargetClass">
<value>true</value>
</property>
<property name="transactionManager" ref="DefaultTransactionManager"/>
<property name="transactionAttributeSource">
<ref bean="DefaultNamingTransactionAttribute"/>
</property>
</bean>
<!-- system interceptor -->
<bean id="BeanInterceptor" class="com.primeton.spring.interceptor.BeanInterceptor"/>
<!-- auto bean proxy -->
<bean class="com.primeton.spring.BeanNameAutoProxy">
<property name="proxyTargetClass">
<value>true</value>
</property>
<property name="beanNames">
<value>*</value>
</property>
<property name="interceptorNames">
<list>
<value>BeanInterceptor</value>
</list>
</property>
</bean>
</beans>