<?xml version="1.0" encoding="UTF-8"?>\r
<beans xmlns="http://www.springframework.org/schema/beans"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:context="http://www.springframework.org/schema/context"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+ xmlns:context="http://www.springframework.org/schema/context"\r
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
\r
- <import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml"/> \r
+ <import resource="classpath:/eu/etaxonomy/cdm/defaultIoApplicationContext.xml"/>\r
+\r
+ <!--\r
+ use TestingTermInitializer\r
+ -->\r
+ <!-- exclude persistent term initializer as we want to use the TestingTermInitializer instead -->\r
+ <context:component-scan base-package="eu/etaxonomy/cdm">\r
+ <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.database\.PersistentTermInitializer"/>\r
+ </context:component-scan>\r
+ <bean id="testingTermInitializer" class="eu.etaxonomy.cdm.database.TestingTermInitializer">\r
+ <property name="termsDataSet" value="classpath:/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml"/>\r
+ <property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/persistence/dao/hibernate/dataset.dtd"/>\r
+ <property name="omit" value="false"/>\r
+ </bean>\r
+<!-- TODO remove <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">\r
+ <property name="omit" value="true"/>\r
+ </bean> -->\r
+\r
+ <!--\r
+ NOTE:\r
+ the database connection is configured in /cdmlib-persistence/src/test/resources/unitils.properties\r
+ -->\r
<bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>\r
- \r
- <bean id="hibernateProperties" \r
+\r
+ <bean id="hibernateProperties"\r
class="org.springframework.beans.factory.config.PropertiesFactoryBean">\r
<property name="properties">\r
<props>\r
- <prop key="hibernate.dialect">org.hibernate.dialect.HSQLCorrectedDialect</prop>\r
- <prop key="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</prop>\r
+ <prop key="hibernate.cache.region.factory_class">org.hibernate.cache.internal.NoCachingRegionFactory</prop>\r
<prop key="hibernate.show_sql">false</prop>\r
<prop key="hibernate.format_sql">false</prop>\r
- <prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider</prop>\r
- <prop key="hibernate.search.default.indexBase">./target/test-classes</prop>\r
+ <prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.impl.FSDirectoryProvider</prop>\r
+ <!-- hibernate.search.default.exclusive_index_use=false\r
+ locks must not only be released after application shutdown in test environment -->\r
+ <prop key="hibernate.search.default.exclusive_index_use">false</prop>\r
+ <prop key="hibernate.search.default.indexBase">./target/index</prop>\r
+ </props>\r
+ </property>\r
+ </bean>\r
+\r
+ <bean id="tableGeneratorGlobalOverride"\r
+ class="eu.etaxonomy.cdm.persistence.hibernate.TableGeneratorGlobalOverride">\r
+ <property name="properties">\r
+ <props>\r
+ <!-- globally overriding id generation settings see: eu.etaxonomy.cdm.persistence.hibernate.TableGenerator -->\r
+ <prop key="optimizer">none</prop>\r
+ <prop key="initial_value">5000</prop><!-- must be higher than any term id in TermsDataSet.xml -->\r
</props>\r
</property>\r
- </bean> \r
- \r
- <bean id="taxonSpellingDirectory" class="org.springmodules.lucene.index.support.FSDirectoryFactoryBean">\r
+ </bean>\r
+\r
+\r
+<!-- <bean id="taxonSpellingDirectory" class="org.springmodules.lucene.index.support.FSDirectoryFactoryBean">\r
<property name="location" value="file:./target/test-classes/eu.etaxonomy.cdm.model.taxon.TaxonBase_spelling"/>\r
<property name="create" value="true"/>\r
</bean>\r
<property name="analyzer">\r
<bean class="org.apache.lucene.analysis.SimpleAnalyzer"/>\r
</property>\r
- </bean>\r
- \r
+ </bean> -->\r
+\r
<bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">\r
<property name="providers">\r
<list>\r
</list>\r
</property>\r
</bean>\r
- \r
+\r
<bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>\r
- \r
+\r
<bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">\r
<property name="userPropertyToUse" value="getUsername"/>\r
</bean>
-
+
</beans>
\ No newline at end of file