applicationContext-common-business.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
  3. <!--
  4. - Application context containing business beans.
  5. -
  6. - Used by all artifacts.
  7. -
  8. - $Id$
  9. -->
  10. <beans>
  11. <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  12. <property name="driverClassName">
  13. <value>org.hsqldb.jdbcDriver</value>
  14. </property>
  15. <property name="url">
  16. <value>jdbc:hsqldb:mem:test</value>
  17. <!-- <value>jdbc:hsqldb:hsql://localhost/acl</value> -->
  18. </property>
  19. <property name="username">
  20. <value>sa</value>
  21. </property>
  22. <property name="password">
  23. <value></value>
  24. </property>
  25. </bean>
  26. <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
  27. <property name="dataSource"><ref local="dataSource"/></property>
  28. </bean>
  29. <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
  30. <property name="transactionManager"><ref bean="transactionManager"/></property>
  31. <property name="transactionAttributeSource">
  32. <value>
  33. sample.contact.ContactManager.create=PROPAGATION_REQUIRED
  34. sample.contact.ContactManager.getAllRecipients=PROPAGATION_REQUIRED,readOnly
  35. sample.contact.ContactManager.getAll=PROPAGATION_REQUIRED,readOnly
  36. sample.contact.ContactManager.getById=PROPAGATION_REQUIRED,readOnly
  37. sample.contact.ContactManager.delete=PROPAGATION_REQUIRED
  38. sample.contact.ContactManager.deletePermission=PROPAGATION_REQUIRED
  39. sample.contact.ContactManager.addPermission=PROPAGATION_REQUIRED
  40. </value>
  41. </property>
  42. </bean>
  43. <bean id="dataSourcePopulator" class="sample.contact.DataSourcePopulator">
  44. <property name="dataSource" ref="dataSource"/>
  45. <property name="mutableAclService" ref="aclService"/>
  46. <property name="platformTransactionManager" ref="transactionManager"/>
  47. </bean>
  48. <bean id="contactDao" class="sample.contact.ContactDaoSpring">
  49. <property name="dataSource"><ref local="dataSource"/></property>
  50. </bean>
  51. <bean id="contactManager" class="org.springframework.aop.framework.ProxyFactoryBean">
  52. <property name="proxyInterfaces"><value>sample.contact.ContactManager</value></property>
  53. <property name="interceptorNames">
  54. <list>
  55. <idref local="transactionInterceptor"/>
  56. <idref bean="contactManagerSecurity"/>
  57. <idref local="contactManagerTarget"/>
  58. </list>
  59. </property>
  60. </bean>
  61. <bean id="contactManagerTarget" class="sample.contact.ContactManagerBackend">
  62. <property name="contactDao"><ref local="contactDao"/></property>
  63. <property name="mutableAclService"><ref bean="aclService"/></property>
  64. </bean>
  65. </beans>