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
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
6
|
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
7
|
http://www.springframework.org/schema/context
|
8
|
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
|
9
|
|
10
|
<!-- enable processing of annotations such as @Autowired and @Configuration -->
|
11
|
<context:annotation-config/>
|
12
|
|
13
|
<bean class="eu.etaxonomy.cdm.opt.config.DataSourceConfigurer" >
|
14
|
</bean>
|
15
|
|
16
|
<bean id="jndiHibernateProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean" >
|
17
|
<property name="locations" value="classpath:hibernate.properties"/>
|
18
|
<property name="localOverride" value="false"/>
|
19
|
<property name="properties">
|
20
|
<!-- This configures default hibernate properties which can be overwritten
|
21
|
by the properties defined in the hibernate.properties file
|
22
|
-->
|
23
|
<props>
|
24
|
<!--
|
25
|
the hibernate.dialect will be set by the JndiDataSourceConfig according to the
|
26
|
according WebAppContext attributes or to the environment variable
|
27
|
-->
|
28
|
<prop key="hibernate.hbm2ddl.auto">validate</prop><!-- !!! must never be set to 'update' !!! -->
|
29
|
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.internal.NoCachingRegionFactory</prop>
|
30
|
<prop key="hibernate.show_sql">false</prop>
|
31
|
<prop key="hibernate.format_sql">false</prop>
|
32
|
<prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.impl.FSDirectoryProvider</prop>
|
33
|
<prop key="hibernate.search.default.indexBase">${eu.etaxonomy.cdm.search.index.path}</prop><!-- set in applicationContext.xml -->
|
34
|
<!--
|
35
|
Using the hibernate.event.merge.entity_copy_observer is a bit risky,
|
36
|
see https://hibernate.atlassian.net/browse/HHH-9106 and
|
37
|
https://dev.e-taxonomy.eu/redmine/issues/6687
|
38
|
-->
|
39
|
<!-- <prop key="hibernate.event.merge.entity_copy_observer">allow</prop> -->
|
40
|
|
41
|
<!-- disabling hibernate search for testing (speed up and lesser heap usage)
|
42
|
<prop key="hibernate.search.autoregister_listeners">false</prop>
|
43
|
-->
|
44
|
|
45
|
</props>
|
46
|
</property>
|
47
|
</bean>
|
48
|
</beans>
|