From c3967eea9f538272d217915220d80c746b010bba Mon Sep 17 00:00:00 2001
From: gpawel <gpawel>
Date: Wed, 15 Aug 2012 13:01:00 +0000
Subject: [PATCH] Disabling index updater when application context is loaded
 for the 1st time

SVN: 26380
---
 openbis/source/java/applicationContext.xml      | 16 ++++++++++++++++
 openbis/source/java/hibernateContext.xml        | 17 -----------------
 ...standard-technologies-applicationContext.xml |  5 +++--
 3 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/openbis/source/java/applicationContext.xml b/openbis/source/java/applicationContext.xml
index 9a1abb0600e..7d15cb52a7c 100644
--- a/openbis/source/java/applicationContext.xml
+++ b/openbis/source/java/applicationContext.xml
@@ -11,4 +11,20 @@
     
     <import resource="genericApplicationContext.xml"/>
     
+    <bean class="org.springframework.scheduling.timer.TimerFactoryBean">
+        <property name="scheduledTimerTasks">
+            <list>
+                <bean class="org.springframework.scheduling.timer.ScheduledTimerTask">
+                    <property name="delay" value="0" />
+                    <property name="runnable" ref="full-text-indexer" />
+                </bean>
+                <bean class="org.springframework.scheduling.timer.ScheduledTimerTask">
+                    <property name="delay" value="1000" />
+                    <property name="runnable" ref="dynamic-property-evaluator" />
+                </bean>
+            </list>
+        </property>
+        <property name="daemon" value="true" />
+    </bean>
+    
 </beans>
\ No newline at end of file
diff --git a/openbis/source/java/hibernateContext.xml b/openbis/source/java/hibernateContext.xml
index b514675c5ff..818294284c2 100644
--- a/openbis/source/java/hibernateContext.xml
+++ b/openbis/source/java/hibernateContext.xml
@@ -190,21 +190,4 @@
         <constructor-arg ref="full-text-index-updater" />
         <constructor-arg ref="dynamic-property-scheduler" />
     </bean>
-    
-    <bean class="org.springframework.scheduling.timer.TimerFactoryBean">
-        <property name="scheduledTimerTasks">
-            <list>
-                <bean class="org.springframework.scheduling.timer.ScheduledTimerTask">
-                    <property name="delay" value="0" />
-                    <property name="runnable" ref="full-text-indexer" />
-                </bean>
-                <bean class="org.springframework.scheduling.timer.ScheduledTimerTask">
-                    <property name="delay" value="1000" />
-                    <property name="runnable" ref="dynamic-property-evaluator" />
-                </bean>
-            </list>
-        </property>
-        <property name="daemon" value="true" />
-    </bean>
-
 </beans>
\ No newline at end of file
diff --git a/openbis_standard_technologies/source/java/standard-technologies-applicationContext.xml b/openbis_standard_technologies/source/java/standard-technologies-applicationContext.xml
index eb620fa2ad5..524257a1379 100644
--- a/openbis_standard_technologies/source/java/standard-technologies-applicationContext.xml
+++ b/openbis_standard_technologies/source/java/standard-technologies-applicationContext.xml
@@ -11,8 +11,9 @@
             http://www.springframework.org/schema/context/spring-context-2.5.xsd
 ">
 
-    <import resource="applicationContext.xml"/>
-    
+    <import resource="genericCommonContext.xml"/>
+    <import resource="genericApplicationContext.xml"/>
+
     <bean name="bootstrap" class="ch.systemsx.cisd.common.spring.Bootstrapper">
         <property name="configLocation" value="classpath:applicationContext.xml" />
         <property name="conditionalConfigLocations">
-- 
GitLab