|
@@ -2,6 +2,10 @@
|
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
|
|
|
|
|
<!--
|
|
<!--
|
|
|
|
+ - Application context containing business beans.
|
|
|
|
+ -
|
|
|
|
+ - Used by all artifacts.
|
|
|
|
+ -
|
|
- $Id$
|
|
- $Id$
|
|
-->
|
|
-->
|
|
|
|
|
|
@@ -12,7 +16,7 @@
|
|
<value>org.hsqldb.jdbcDriver</value>
|
|
<value>org.hsqldb.jdbcDriver</value>
|
|
</property>
|
|
</property>
|
|
<property name="url">
|
|
<property name="url">
|
|
- <value>jdbc:hsqldb:mem:test</value>
|
|
|
|
|
|
+ <value>jdbc:hsqldb:mem:contacts</value>
|
|
</property>
|
|
</property>
|
|
<property name="username">
|
|
<property name="username">
|
|
<value>sa</value>
|
|
<value>sa</value>
|
|
@@ -22,4 +26,47 @@
|
|
</property>
|
|
</property>
|
|
</bean>
|
|
</bean>
|
|
|
|
|
|
|
|
+ <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
|
|
|
+ <property name="dataSource"><ref local="dataSource"/></property>
|
|
|
|
+ </bean>
|
|
|
|
+
|
|
|
|
+ <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
|
|
|
+ <property name="transactionManager"><ref bean="transactionManager"/></property>
|
|
|
|
+ <property name="transactionAttributeSource">
|
|
|
|
+ <value>
|
|
|
|
+ sample.contact.ContactManager.create=PROPAGATION_REQUIRED
|
|
|
|
+ sample.contact.ContactManager.getAllRecipients=PROPAGATION_REQUIRED,readOnly
|
|
|
|
+ sample.contact.ContactManager.getAll=PROPAGATION_REQUIRED,readOnly
|
|
|
|
+ sample.contact.ContactManager.getById=PROPAGATION_REQUIRED,readOnly
|
|
|
|
+ sample.contact.ContactManager.delete=PROPAGATION_REQUIRED
|
|
|
|
+ sample.contact.ContactManager.deletePermission=PROPAGATION_REQUIRED
|
|
|
|
+ sample.contact.ContactManager.addPermission=PROPAGATION_REQUIRED
|
|
|
|
+ </value>
|
|
|
|
+ </property>
|
|
|
|
+ </bean>
|
|
|
|
+
|
|
|
|
+ <bean id="dataSourcePopulator" class="sample.contact.DataSourcePopulator">
|
|
|
|
+ <property name="dataSource"><ref local="dataSource"/></property>
|
|
|
|
+ </bean>
|
|
|
|
+
|
|
|
|
+ <bean id="contactDao" class="sample.contact.ContactDaoSpring">
|
|
|
|
+ <property name="dataSource"><ref local="dataSource"/></property>
|
|
|
|
+ </bean>
|
|
|
|
+
|
|
|
|
+ <bean id="contactManager" class="org.springframework.aop.framework.ProxyFactoryBean">
|
|
|
|
+ <property name="proxyInterfaces"><value>sample.contact.ContactManager</value></property>
|
|
|
|
+ <property name="interceptorNames">
|
|
|
|
+ <list>
|
|
|
|
+ <idref local="transactionInterceptor"/>
|
|
|
|
+ <idref bean="contactManagerSecurity"/>
|
|
|
|
+ <idref local="contactManagerTarget"/>
|
|
|
|
+ </list>
|
|
|
|
+ </property>
|
|
|
|
+ </bean>
|
|
|
|
+
|
|
|
|
+ <bean id="contactManagerTarget" class="sample.contact.ContactManagerBackend">
|
|
|
|
+ <property name="contactDao"><ref local="contactDao"/></property>
|
|
|
|
+ <property name="basicAclExtendedDao"><ref bean="basicAclExtendedDao"/></property>
|
|
|
|
+ </bean>
|
|
|
|
+
|
|
</beans>
|
|
</beans>
|