Project

General

Profile

Download (4.39 KB) Statistics
| Branch: | Tag: | Revision:
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xmlns:context="http://www.springframework.org/schema/context"
5
	xmlns:tx="http://www.springframework.org/schema/tx"
6
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
7
    http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
8
    http://www.springframework.org/schema/context
9
    http://www.springframework.org/schema/context/spring-context-4.3.xsd
10
    http://www.springframework.org/schema/tx 
11
    http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
12

    
13
<!-- Until now this is mostly a quick and dirty copy of cdmlib-remote-webapp applicationContext.xml to 
14
   make debugging from commandline possible in cdmlib-remote  -->
15

    
16
  <!-- 
17
    NOTE: 
18
    For a detailed overview on the spring MVC and application context configuration and 
19
    bootstrapping of this web application see: 
20
    http://dev.e-taxonomy.eu/redmine/projects/edit/wiki/cdmlib-remote-webappConfigurationAndBootstrapping
21
  -->
22
  
23
  <context:annotation-config />
24

    
25
  <!-- include default application context and customization -->
26
  <import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml" />
27
  <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">
28
    <property name="omit" value="false" />
29
  </bean>
30
  <context:component-scan base-package="eu/etaxonomy/cdm/ext" />
31

    
32
  <import resource="classpath:/eu/etaxonomy/cdm/remote.xml"/>
33
  <context:component-scan base-package="eu/etaxonomy/cdm/io"/>
34

    
35
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
36
    <property name="properties">
37
      <props>
38
        <prop key="eu.etaxonomy.cdm.base.path">${user.home}/.cdmLibrary/</prop>
39
        <prop key="eu.etaxonomy.cdm.search.index.path">${user.home}/.cdmLibrary/index/</prop>
40
      </props>
41
    </property>
42
  </bean>
43

    
44
  <!-- enable the configuration of transactional behavior based on annotations -->
45
  <tx:annotation-driven transaction-manager="transactionManager" />
46

    
47
  <!-- import additional beans into the root context -->
48
<!--   <import resource="applicationContext.views.xml" /> -->
49

    
50
  <!-- import configuration of the datasource bean -->
51
<!--   <import resource="datasources/configurable.xml" /> -->
52
  
53
  <!-- bootstrap the Web Configuration -->
54
  <bean class="eu.etaxonomy.cdm.remote.config.MultiWebSecurityConfiguration" />
55
  
56
<!--   <bean class="eu.etaxonomy.cdm.opt.config.LoggingConfigurer" /> -->
57
  
58
<!--   <bean class="eu.etaxonomy.cdm.opt.config.EhCacheDiskStoreConfiguration" /> -->
59

    
60
  <!-- OAI-PMH TODO externalize? -->
61
  <bean name="taxonOaiPmhController"
62
    class="eu.etaxonomy.cdm.remote.controller.oaipmh.TaxonOaiPmhController">
63
    <property name="cachingModel" ref="taxonOaiPmhCacheMapping" />
64
  </bean>
65

    
66
  <bean name="taxonOaiPmhCacheMapping"
67
    class="org.springmodules.cache.provider.ehcache.EhCacheCachingModel">
68
    <property name="cacheName"
69
      value="eu.etaxonomy.cdm.remote.controller.TaxonOaiPmhController.resumptionToken" />
70
  </bean>
71

    
72
  <bean id="serializableFactory" class="org.springmodules.cache.serializable.XStreamSerializableFactory" />
73

    
74
  <bean id="cacheProviderFacade" class="org.springmodules.cache.provider.ehcache.EhCacheFacade">
75
    <!-- 
76
        the cacheManager is provided by the eu.etaxonomy.cdm.api.config.EhCacheConfiguration
77
        in cdmlib-services
78
     -->
79
    <property name="cacheManager" ref="cacheManager" />
80
    <property name="serializableFactory" ref="serializableFactory" />
81
  </bean>
82
  
83
  
84

    
85
<!--     <context:property-override location="classpath:eu/etaxonomy/cdm/override.properties"/> -->
86
   
87
    <!-- 
88
        This applicationContext is not a full cdm application context. It only covers the remote components 
89
        without service and persistence. The cacheManager is usually provided via a Java config class in
90
        eu/etaxonomy/cdm/service/api/conf which cannot be used in this context. Therefore we are 
91
        using the EhCacheManagerFactoryBean here to initialize the cacheManager bean.
92
     -->
93
<!--     <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> -->
94
<!--       <property name="configLocation" value="classpath:/eu/etaxonomy/cdm/remote/ehcache.xml"/> -->
95
<!--       <property name="shared" value="true"/> -->
96
<!--     </bean>  -->
97

    
98
    <context:component-scan base-package="eu/etaxonomy/cdm/remote/controller"/> 
99
</beans>
(2-2/3)