commit 87f35b2d5fc61c9e8eb9a2e1e807e4386f97b458
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Mon Nov 27 10:31:42 2017 +0100

    fxing problems in testsetup:
      - separate applicationContext.xml for old tests and for alternative tests
      - removing TDYPE from taxonname and reference test data xml

diff --git a/src/test/java/eu/etaxonomy/cdm/CdmVaadinIntegrationTest.java b/src/test/java/eu/etaxonomy/cdm/CdmVaadinIntegrationTest.java
index 9680824c..3c062472 100644
--- a/src/test/java/eu/etaxonomy/cdm/CdmVaadinIntegrationTest.java
+++ b/src/test/java/eu/etaxonomy/cdm/CdmVaadinIntegrationTest.java
@@ -24,7 +24,7 @@ import unitils.AlternativeUnitilsJUnit4TestClassRunner;
  *
  */
 @RunWith(AlternativeUnitilsJUnit4TestClassRunner.class)
-@SpringApplicationContext("file:./src/test/resources/webapp/WEB-INF/applicationContext.xml")
+@SpringApplicationContext("file:./src/test/resources/webapp/WEB-INF/applicationContext-alternative.xml")
 @Transactional(TransactionMode.DISABLED)
 public abstract class CdmVaadinIntegrationTest extends CdmIntegrationTest {
 
diff --git a/src/test/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.java b/src/test/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.java
index 87b4505a..95b7c2a1 100644
--- a/src/test/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.java
+++ b/src/test/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.java
@@ -98,7 +98,7 @@ public class SpecimenTypeDesignationWorkingsetEditorPresenterTest extends CdmVaa
 
        service.save(workingset);
 
-       printDataSetWithNull(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
+       //printDataSetWithNull(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
 
        workingset = service.loadDtoByIds(registrationId, 0);
 
@@ -157,7 +157,7 @@ public class SpecimenTypeDesignationWorkingsetEditorPresenterTest extends CdmVaa
 
         service.save(workingset);
 
-        printDataSetWithNull(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
+        //printDataSetWithNull(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
 
         workingset = service.loadDtoByIds(registrationId, 0);
         Assert.assertEquals(1, workingset.getSpecimenTypeDesignationDTOs().size());
diff --git a/src/test/java/eu/etaxonomy/cdm/vaadin/CdmVaadinBaseTest.java b/src/test/java/eu/etaxonomy/cdm/vaadin/CdmVaadinBaseTest.java
index c0c7da31..d088f7e8 100644
--- a/src/test/java/eu/etaxonomy/cdm/vaadin/CdmVaadinBaseTest.java
+++ b/src/test/java/eu/etaxonomy/cdm/vaadin/CdmVaadinBaseTest.java
@@ -1,18 +1,23 @@
 package eu.etaxonomy.cdm.vaadin;
 
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
 import javax.servlet.ServletException;
 
 import org.easymock.EasyMock;
+import org.h2.tools.Server;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.runner.RunWith;
 import org.springframework.mock.web.MockServletConfig;
 import org.springframework.mock.web.MockServletContext;
 import org.springframework.web.context.ContextLoaderListener;
-import org.unitils.UnitilsJUnit4;
+import org.unitils.UnitilsJUnit4TestClassRunner;
 import org.unitils.database.DatabaseUnitils;
 import org.unitils.database.annotations.Transactional;
 import org.unitils.database.util.TransactionMode;
@@ -26,12 +31,11 @@ import com.vaadin.server.VaadinServletService;
 import com.vaadin.server.VaadinSession;
 
 import eu.etaxonomy.cdm.vaadin.util.CdmSQLStringDecorator;
-import unitils.AlternativeUnitilsJUnit4TestClassRunner;
 
-@Ignore
-@RunWith(AlternativeUnitilsJUnit4TestClassRunner.class)
+
+@RunWith(UnitilsJUnit4TestClassRunner.class)
 @Transactional(TransactionMode.DISABLED)
-public class CdmVaadinBaseTest extends UnitilsJUnit4 {
+public abstract class CdmVaadinBaseTest {
 
     private static MockServletContext servletContext;
     private static VaadinServlet vaadinServlet;
@@ -39,6 +43,7 @@ public class CdmVaadinBaseTest extends UnitilsJUnit4 {
     private static VaadinSession vaadinSession;
     private static boolean isVaadinServletEnvCreated = false;
 
+    private static final String PROPERTY_H2_SERVER = "h2Server";
 
     @BeforeClass
     public static void setup() {
@@ -62,6 +67,26 @@ public class CdmVaadinBaseTest extends UnitilsJUnit4 {
         Assert.assertEquals(vaadinService, VaadinService.getCurrent());
     }
 
+    @Before
+    public void startH2Server() throws Exception {
+
+        if(System.getProperty(PROPERTY_H2_SERVER) != null){
+            try {
+                List<String> args = new ArrayList<String>();
+                try {
+                    Integer port = Integer.parseInt(System.getProperty(PROPERTY_H2_SERVER));
+                    args.add("-webPort");
+                    args.add(port.toString());
+                } catch (Exception e) {
+                    // will start at port 8082 by default
+                }
+                Server.createWebServer(args.toArray(new String[]{})).start();
+            } catch (SQLException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
 
     public static void createNewServletEnvironment() {
 		servletContext = new MockServletContext("/webapp");
diff --git a/src/test/resources/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.xml b/src/test/resources/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.xml
index a7166d97..f6b1107e 100644
--- a/src/test/resources/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.xml
+++ b/src/test/resources/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.xml
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <dataset>
-  <TAXONNAME DTYPE="[null]" ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="bd294483-8383-4a5c-bf76-ffa3e104dc9e" UPDATED="2017-11-24 22:17:27.447" NAMETYPE="ICNAFP" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Planothidium victori" APPENDEDPHRASE="[null]" FULLTITLECACHE="Planothidium victori in - undefined journal -: 11-45" NOMENCLATURALMICROREFERENCE="11-45" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" GENUSORUNINOMIAL="Planothidium" HYBRIDFORMULA="false" INFRAGENERICEPITHET="[null]" INFRASPECIFICEPITHET="[null]" MONOMHYBRID="false" NAMECACHE="Planothidium victori" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" SPECIFICEPITHET="victori" TRINOMHYBRID="false" NAMEAPPROBATION="[null]" SUBGENUSAUTHORSHIP="[null]" ANAMORPHIC="false" CULTIVARNAME="[null]" ACRONYM="[null]" BREED="[null]" ORIGINALPUBLICATIONYEAR="[null]" PUBLICATIONYEAR="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" HOMOTYPICALGROUP_ID="5000" NOMENCLATURALREFERENCE_ID="5000" RANK_ID="765" BASIONYMAUTHORSHIP_ID="[null]" COMBINATIONAUTHORSHIP_ID="[null]" EXBASIONYMAUTHORSHIP_ID="[null]" EXCOMBINATIONAUTHORSHIP_ID="[null]"/>
-  <REFERENCE DTYPE="[null]" ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="ed1c8722-015b-4a94-82a6-0b42e03d0e92" UPDATED="2017-11-24 22:17:27.448" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" DATEPUBLISHED_END="[null]" DATEPUBLISHED_FREETEXT="[null]" DATEPUBLISHED_START="[null]" EDITION="[null]" EDITOR="[null]" ISBN="[null]" ISSN="[null]" DOI="[null]" NOMENCLATURALLYRELEVANT="false" ORGANIZATION="[null]" PAGES="[null]" PARSINGPROBLEM="0" PLACEPUBLISHED="[null]" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PUBLISHER="[null]" REFERENCEABSTRACT="[null]" SERIESPART="[null]" TITLE="P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64" ABBREVTITLE="[null]" ABBREVTITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" PROTECTEDABBREVTITLECACHE="false" REFTYPE="ART" URI="[null]" VOLUME="[null]" ACCESSED="[null]" LASTRETRIEVED="[null]" EXTERNALID="[null]" EXTERNALLINK="[null]" AUTHORITYTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" AUTHORSHIP_ID="5000" INREFERENCE_ID="[null]" INSTITUTION_ID="[null]" SCHOOL_ID="[null]"/>
+  <TAXONNAME ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="bd294483-8383-4a5c-bf76-ffa3e104dc9e" UPDATED="2017-11-24 22:17:27.447" NAMETYPE="ICNAFP" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Planothidium victori" APPENDEDPHRASE="[null]" FULLTITLECACHE="Planothidium victori in - undefined journal -: 11-45" NOMENCLATURALMICROREFERENCE="11-45" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" GENUSORUNINOMIAL="Planothidium" HYBRIDFORMULA="false" INFRAGENERICEPITHET="[null]" INFRASPECIFICEPITHET="[null]" MONOMHYBRID="false" NAMECACHE="Planothidium victori" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" SPECIFICEPITHET="victori" TRINOMHYBRID="false" NAMEAPPROBATION="[null]" SUBGENUSAUTHORSHIP="[null]" ANAMORPHIC="false" CULTIVARNAME="[null]" ACRONYM="[null]" BREED="[null]" ORIGINALPUBLICATIONYEAR="[null]" PUBLICATIONYEAR="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" HOMOTYPICALGROUP_ID="5000" NOMENCLATURALREFERENCE_ID="5000" RANK_ID="765" BASIONYMAUTHORSHIP_ID="[null]" COMBINATIONAUTHORSHIP_ID="[null]" EXBASIONYMAUTHORSHIP_ID="[null]" EXCOMBINATIONAUTHORSHIP_ID="[null]"/>
+  <REFERENCE ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="ed1c8722-015b-4a94-82a6-0b42e03d0e92" UPDATED="2017-11-24 22:17:27.448" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" DATEPUBLISHED_END="[null]" DATEPUBLISHED_FREETEXT="[null]" DATEPUBLISHED_START="[null]" EDITION="[null]" EDITOR="[null]" ISBN="[null]" ISSN="[null]" DOI="[null]" NOMENCLATURALLYRELEVANT="false" ORGANIZATION="[null]" PAGES="[null]" PARSINGPROBLEM="0" PLACEPUBLISHED="[null]" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PUBLISHER="[null]" REFERENCEABSTRACT="[null]" SERIESPART="[null]" TITLE="P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64" ABBREVTITLE="[null]" ABBREVTITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" PROTECTEDABBREVTITLECACHE="false" REFTYPE="ART" URI="[null]" VOLUME="[null]" ACCESSED="[null]" LASTRETRIEVED="[null]" EXTERNALID="[null]" EXTERNALLINK="[null]" AUTHORITYTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" AUTHORSHIP_ID="5000" INREFERENCE_ID="[null]" INSTITUTION_ID="[null]" SCHOOL_ID="[null]"/>
   <AGENTBASE DTYPE="Team" ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="5e7b791e-d17f-4378-9a47-923ebebc9b6a" UPDATED="2017-11-24 22:17:27.449" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="true" TITLECACHE="Novis, Braidwood &amp; Kilroy" PROTECTEDCOLLECTORTITLECACHE="false" COLLECTORTITLE="[null]" PROTECTEDNOMENCLATURALTITLECACHE="true" NOMENCLATURALTITLE="Novis, Braidwood &amp; Kilroy" CODE="[null]" NAME="[null]" FIRSTNAME="[null]" INITIALS="[null]" LASTNAME="[null]" LIFESPAN_END="[null]" LIFESPAN_FREETEXT="[null]" LIFESPAN_START="[null]" PREFIX="[null]" SUFFIX="[null]" HASMOREMEMBERS="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ISPARTOF_ID="[null]"/>
   <HOMOTYPICALGROUP ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="76cb5ec1-ac61-4c40-a0e2-1bb738f04575" UPDATED="2017-11-24 22:17:27.448" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]"/>
   <REGISTRATION ID="5000" CREATED="2017-11-24 22:17:27.0" UUID="247090ee-31b4-4738-970c-69813e785a86" UPDATED="[null]" IDENTIFIER="[null]" REGISTRATIONDATE="[null]" SPECIFICIDENTIFIER="[null]" STATUS="PREP" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" INSTITUTION_ID="[null]" NAME_ID="5000" SUBMITTER_ID="[null]"/>
diff --git a/src/test/resources/h2/cdmTest.h2.db b/src/test/resources/h2/cdmTest.h2.db
index 6235bf2f..3a0a76d8 100644
Binary files a/src/test/resources/h2/cdmTest.h2.db and b/src/test/resources/h2/cdmTest.h2.db differ
diff --git a/src/test/resources/h2/cdmTest.trace.db b/src/test/resources/h2/cdmTest.trace.db
new file mode 100644
index 00000000..649e680e
--- /dev/null
+++ b/src/test/resources/h2/cdmTest.trace.db
@@ -0,0 +1,19 @@
+2017-11-27 09:27:02 jdbc[3]: null
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-190]
+	at org.h2.message.DbException.get(DbException.java:179)
+	at org.h2.message.DbException.get(DbException.java:155)
+	at org.h2.message.DbException.get(DbException.java:144)
+	at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:173)
+	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:118)
+	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
+	at org.h2.Driver.connect(Driver.java:72)
+	at org.h2.server.web.WebServer.getConnection(WebServer.java:735)
+	at org.h2.server.web.WebApp.login(WebApp.java:955)
+	at org.h2.server.web.WebApp.process(WebApp.java:211)
+	at org.h2.server.web.WebApp.processRequest(WebApp.java:170)
+	at org.h2.server.web.WebThread.process(WebThread.java:133)
+	at org.h2.server.web.WebThread.run(WebThread.java:89)
+	at java.lang.Thread.run(Thread.java:748)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-190]
+	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
+	... 14 more
diff --git a/src/test/resources/webapp/WEB-INF/applicationContext-alternative.xml b/src/test/resources/webapp/WEB-INF/applicationContext-alternative.xml
new file mode 100644
index 00000000..499d259c
--- /dev/null
+++ b/src/test/resources/webapp/WEB-INF/applicationContext-alternative.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:tx="http://www.springframework.org/schema/tx"
+    xmlns:context="http://www.springframework.org/schema/context"
+    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
+    http://www.springframework.org/schema/tx   http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+    ">
+
+  <!-- 
+    NOTE: 
+    For a detailed overview on the spring MVC and application context configuration and 
+    bootstrapping of this web application see: 
+    http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping
+  -->
+   
+   <context:annotation-config />
+   
+    <!--  
+        find the eu.etaxonomy.cdm.remote.config.CdmVaadinConfiguration
+    -->
+   <context:component-scan base-package="eu/etaxonomy/cdm/addon/config" />
+    
+   <!-- include default application context and customization -->
+   <import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml"/>
+   
+   <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
+   
+   <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">
+       <property name="omit" value="true" />
+   </bean>
+   <context:component-scan base-package="eu/etaxonomy/cdm/ext" />
+
+  <!--   <import resource="classpath:/eu/etaxonomy/cdm/remote.xml"/> -->
+  <!--   <context:component-scan base-package="eu/etaxonomy/cdm/io">
+        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.pesi.*" />
+        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.faunaEuropaea.*" />
+        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.erms.*" />
+        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.eflora.*" />
+        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.berlinModel.*" />
+    </context:component-scan> -->
+
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+      <property name="properties">
+        <props>
+            <prop key="eu.etaxonomy.cdm.base.path">${user.home}/.cdmLibrary/</prop>
+            <prop key="eu.etaxonomy.cdm.search.index.path">${user.home}/.cdmLibrary/index/</prop>
+        </props>
+          </property>
+    </bean>
+
+    <!-- enable the configuration of transactional behavior based on annotations -->
+    <tx:annotation-driven transaction-manager="transactionManager"/>
+    
+    <import resource="classpath:/eu/etaxonomy/cdm/applicationContext-test.common.xml" />
+    
+    <bean id="termInitializer" class="eu.etaxonomy.cdm.database.TestingTermInitializer">
+        <property name="termsDataSet" value="classpath:/eu/etaxonomy/cdm/database/TermsDataSet-ui-registration-with_auditing_info.xml"/> 
+        <property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/database/schema/dataset.dtd"/>
+    </bean>
+    
+</beans>
\ No newline at end of file
diff --git a/src/test/resources/webapp/WEB-INF/applicationContext.xml b/src/test/resources/webapp/WEB-INF/applicationContext.xml
index fb662e4c..48accc1d 100755
--- a/src/test/resources/webapp/WEB-INF/applicationContext.xml
+++ b/src/test/resources/webapp/WEB-INF/applicationContext.xml
@@ -1,63 +1,106 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:tx="http://www.springframework.org/schema/tx"
-    xmlns:context="http://www.springframework.org/schema/context"
-    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
-    http://www.springframework.org/schema/tx   http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-    ">
-
-  <!-- 
-    NOTE: 
-    For a detailed overview on the spring MVC and application context configuration and 
-    bootstrapping of this web application see: 
-    http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping
-  -->
-   
-   <context:annotation-config />
-   
-    <!--  
-        find the eu.etaxonomy.cdm.remote.config.CdmVaadinConfiguration
-    -->
-   <context:component-scan base-package="eu/etaxonomy/cdm/addon/config" />
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:context="http://www.springframework.org/schema/context"
+  xmlns:tx="http://www.springframework.org/schema/tx"
+    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
+    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+    ">
+
+    <context:property-override location="classpath:override.properties"/>
     
-   <!-- include default application context and customization -->
-   <import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml"/>
-   
-   <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
-   
-   <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">
-       <property name="omit" value="true" />
-   </bean>
-   <context:component-scan base-package="eu/etaxonomy/cdm/ext" />
-
-  <!--   <import resource="classpath:/eu/etaxonomy/cdm/remote.xml"/> -->
-  <!--   <context:component-scan base-package="eu/etaxonomy/cdm/io">
-        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.pesi.*" />
-        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.faunaEuropaea.*" />
-        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.erms.*" />
-        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.eflora.*" />
-        <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.berlinModel.*" />
-    </context:component-scan> -->
-
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-      <property name="properties">
-        <props>
-            <prop key="eu.etaxonomy.cdm.base.path">${user.home}/.cdmLibrary/</prop>
-            <prop key="eu.etaxonomy.cdm.search.index.path">${user.home}/.cdmLibrary/index/</prop>
-        </props>
-          </property>
-    </bean>
+    <context:component-scan base-package="eu/etaxonomy/cdm/api/config" />
+
+    <context:component-scan base-package="eu/etaxonomy/cdm/api/service">
+    </context:component-scan>
+    
+    <context:component-scan base-package="eu/etaxonomy/cdm/api/application">
+    </context:component-scan>    
+
+    <import resource="classpath:/eu/etaxonomy/cdm/services.xml"/>
 
+	<context:component-scan base-package="eu/etaxonomy/cdm/api/cache"/>
     <!-- enable the configuration of transactional behavior based on annotations -->
     <tx:annotation-driven transaction-manager="transactionManager"/>
-    
-    <import resource="classpath:/eu/etaxonomy/cdm/applicationContext-test.common.xml" />
-    
-    <bean id="termInitializer" class="eu.etaxonomy.cdm.database.TestingTermInitializer">
-        <property name="termsDataSet" value="classpath:/eu/etaxonomy/cdm/database/TermsDataSet-ui-registration-with_auditing_info.xml"/> 
-        <property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/database/schema/dataset.dtd"/>
+
+    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
+
+    <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">
+        <property name="omit" value="false"/>
     </bean>
-    
-</beans>
\ No newline at end of file
+
+    <bean id="hibernateProperties"
+        class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+        <property name="properties">
+            <props>
+                <prop key="hibernate.cache.region.factory_class">org.hibernate.cache.internal.NoCachingRegionFactory</prop>
+                <prop key="hibernate.show_sql">false</prop>
+                <prop key="hibernate.format_sql">false</prop>
+                <prop key="hibernate.search.autoregister_listeners">false</prop>
+                <prop key="hibernate.jdbc.batch_size">0</prop>
+            </props>
+        </property>
+    </bean>
+
+    <bean id="tableGeneratorGlobalOverride"
+        class="eu.etaxonomy.cdm.persistence.hibernate.TableGeneratorGlobalOverride">
+        <property name="properties">
+            <props>
+                <!--
+                    globally overriding id generation settings see: eu.etaxonomy.cdm.persistence.hibernate.TableGenerator
+                 -->
+                <prop key="optimizer">none</prop>
+                <prop key="initial_value">5000</prop><!-- must be higher than any term id in TermsDataSet.xml -->
+            </props>
+        </property>
+    </bean>
+
+
+<!--
+   We do not use spelling suggestions anymore. This one relates to spring modules which is
+    somewhat out-dated. Once we work again with spelling suggestions we better use a modern
+    approach, e.g. annotation based.
+    <bean id="taxonSpellingDirectory" class="org.springmodules.lucene.index.support.FSDirectoryFactoryBean">
+      <property name="location" value="file:./target/index/eu.etaxonomy.cdm.model.taxon.TaxonBase_spelling"/>
+      <property name="create" value="true"/>
+    </bean> -->
+
+    <bean id="validatorFactory" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
+        <property name="mappingLocations">
+            <set>
+                <value>classpath:/eu/etaxonomy/cdm/validation/name/TaxonName-Constraints.xml</value>
+            </set>
+        </property>
+    </bean>
+
+
+    <!-- equips a new and empty database with the initial set of meta data and admin user   -->
+    <bean id="firstDataInserter" class="eu.etaxonomy.cdm.api.application.FirstDataInserter" />
+
+    <!-- security  -->
+    <bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>
+    <bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">
+        <property name="userPropertyToUse" value="getUsername"/>
+    </bean>
+    <bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
+        <property name="userDetailsService" ref="userService"/>
+        <property name="saltSource" ref="saltSource"/>
+        <property name="passwordEncoder" ref="passwordEncoder"/>
+    </bean>
+    <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
+            <constructor-arg>
+	            <list>
+	                <ref local="daoAuthenticationProvider"/>
+	            </list>
+	        </constructor-arg>
+<!--         <property name="providers"> -->
+<!--             <list> -->
+<!--                 <bean class="org.springframework.security.authentication.TestingAuthenticationProvider"/> -->
+<!--                 <ref local="daoAuthenticationProvider"/> -->
+<!--             </list> -->
+<!--         </property> -->
+    </bean>
+
+</beans>
