Project

General

Profile

Revision 2638be38

ID2638be38d1f2f957820ca1906df2aa1795123eb2
Parent 398bcf3e
Child 69f17e7e

Added by Andreas Müller over 4 years ago

migrate to hibernate 5 for cdmlib-services and cdmlib-ext #4716

  • (except for hibernate search tests)
  • including new spring-config structure

View differences:

cdmlib-test/src/main/resources/eu/etaxonomy/cdm/applicationContext-test.common.xml
18 18
     -->
19 19

  
20 20
    <!-- exclude persistent term initializer as we want to use the TestingTermInitializer instead -->
21
    <context:component-scan base-package="eu/etaxonomy/cdm">
22
      <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.database\.PersistentTermInitializer"/>
23
    </context:component-scan>
21
    <context:component-scan base-package="eu/etaxonomy/cdm/persistence/"/>
22

  
23
    <bean id="testingTermVocabularyDao" class="eu.etaxonomy.cdm.database.TestingTermVocabularyDao"/>
24 24

  
25 25
    <bean id="termInitializer" class="eu.etaxonomy.cdm.database.TestingTermInitializer">
26 26
        <property name="termsDataSet" value="classpath:/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml"/>
27
        <property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/persistence/dao/hibernate/dataset.dtd"/>
27
        <property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/database/schema/dataset.dtd"/>
28 28
    </bean>
29 29
    <!-- alternative way :
30 30
    <bean id="testingTermInitializer" class="eu.etaxonomy.cdm.database.TestingTermInitializer">
31 31
        <property name="termsDataSet" value="classpath:/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml"/>
32
        <property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/persistence/dao/hibernate/dataset.dtd"/>
32
        <property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/database/schema/dataset.dtd"/>
33 33
        <property name="omit" value="false"/>
34 34
    </bean>
35 35
    <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">
36 36
        <property name="omit" value="true"/>
37 37
    </bean>
38 38
     -->
39
     
40
    <context:component-scan base-package="eu/etaxonomy/cdm/api/cache"/>
39 41

  
40 42
    <!-- enable the configuration of transactional behavior based on annotations -->
41 43
    <tx:annotation-driven transaction-manager="transactionManager"/>
......
53 55
                <prop key="hibernate.format_sql">false</prop>
54 56
                <prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.impl.FSDirectoryProvider</prop>
55 57
                <prop key="hibernate.search.default.indexBase">./target/index</prop>
58
                <!--  hibernate.search.default.exclusive_index_use=false
59
                      locks must not only be released after application shutdown in test environment -->
60
                <prop key="hibernate.search.default.exclusive_index_use">false</prop>
56 61
                <prop key="hibernate.dialect">org.hibernate.dialect.H2CorrectedDialectTest</prop>
57 62
                <prop key="implicitNamingStrategy">org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl"</prop>
58
               
63
                <!-- hsqldb v. <1.9 has a bug (http://sourceforge.net/tracker/?func=detail&atid=378131&aid=1407528&group_id=23316)
64
                    due to which it is not possible to use batch updates, so we need to disable
65
                    hibernate batching when using hsqldb in the app context: -->
66
                <prop key="hibernate.jdbc.batch_size">0</prop>
59 67
            </props>
60 68
        </property>
61 69
    </bean>

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)