had to rename the packages to make them compliant with buckminster
[taxeditor.git] / eu.etaxonomy.taxeditor.navigation / src / test / resources / eu / etaxonomy / cdm / applicationContext-test.xml
diff --git a/eu.etaxonomy.taxeditor.navigation/src/test/resources/eu/etaxonomy/cdm/applicationContext-test.xml b/eu.etaxonomy.taxeditor.navigation/src/test/resources/eu/etaxonomy/cdm/applicationContext-test.xml
new file mode 100644 (file)
index 0000000..9397c44
--- /dev/null
@@ -0,0 +1,66 @@
+<?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
+       xmlns:tx="http://www.springframework.org/schema/tx"\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/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd\r
+    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+\r
+    <import resource="classpath:/eu/etaxonomy/cdm/services.xml"/> \r
+\r
+       <context:component-scan base-package="eu/etaxonomy/cdm/api"/>\r
+    \r
+    <!-- enable the configuration of transactional behavior based on annotations -->\r
+    <tx:annotation-driven transaction-manager="transactionManager"/>      \r
+  \r
+       <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">\r
+           <property name="namingStrategy">\r
+               <bean class="org.hibernate.cfg.DefaultComponentSafeNamingStrategy" />\r
+           </property>\r
+           \r
+<!--       <property name="entityInterceptor">\r
+               <bean class="eu.etaxonomy.cdm.persistence.hibernate.CdmHibernateInterceptor" />\r
+       </property>\r
+  -->      \r
+           <property name="configLocation" value="classpath:eu/etaxonomy/cdm/hibernate.cfg.xml"/>\r
+           <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/>\r
+           <property name="dataSource" ref="dataSource"/>\r
+           <property name="hibernateProperties" ref="hibernateProperties"/>\r
+       </bean>\r
+  \r
+
+    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>\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
+                <!-- TODO trying to use a managed session context -->\r
+                <prop key="hibernate.current_session_context_class">managed</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
+            </props>\r
+        </property>\r
+    </bean> \r
+    \r
+    <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">\r
+        <property name="providers">\r
+            <list>\r
+                <bean class="org.springframework.security.providers.TestingAuthenticationProvider"/>\r
+            </list>\r
+        </property>\r
+    </bean>\r
+    \r
+    <bean id="passwordEncoder" class="org.springframework.security.providers.encoding.Md5PasswordEncoder"/>\r
+    \r
+    <bean id="saltSource" class="org.springframework.security.providers.dao.salt.ReflectionSaltSource">\r
+        <property name="userPropertyToUse" value="getUsername"/>\r
+    </bean>
+    
+</beans>
\ No newline at end of file