CdmApplicationRemoteController : moved cdm model caching to start before application...
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 1 Jun 2015 15:07:47 +0000 (17:07 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 1 Jun 2015 15:07:47 +0000 (17:07 +0200)
CdmApplicationRemoteConfiguration : moved bean initialization from autowiring to getBean in getters for better performance
httpInvokerServiceClients.xml : changed init startegy for services to lazy init
CdmModelCacher : commented out logging

eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/httpInvokerServiceClients.xml

index 321df5830bebf250095250ba5697d18364bd3026..ec310b56397e1e6b3325ef8d7db894b57add55eb 100644 (file)
@@ -9,15 +9,10 @@
 \r
 package eu.etaxonomy.cdm.api.application;\r
 \r
-import javax.sql.DataSource;\r
-\r
 import org.apache.log4j.Logger;\r
-import org.hibernate.SessionFactory;\r
 import org.springframework.beans.BeansException;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
 import org.springframework.context.ApplicationContext;\r
 import org.springframework.context.ApplicationContextAware;\r
-import org.springframework.orm.hibernate4.HibernateTransactionManager;\r
 import org.springframework.security.authentication.ProviderManager;\r
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;\r
 import org.springframework.security.core.Authentication;\r
@@ -79,101 +74,6 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
 \r
     protected ApplicationContext applicationContext;\r
 \r
-    @Autowired\r
-    //@Qualifier("nameService")\r
-    private INameService nameService;\r
-    @Autowired\r
-    //@Qualifier("taxonService")\r
-    private ITaxonService taxonService;\r
-    @Autowired\r
-    //@Qualifier("classificationService")\r
-    private IClassificationService classificationService;\r
-    @Autowired\r
-    //@Qualifier("referenceService")\r
-    private IReferenceService referenceService;\r
-    @Autowired\r
-    //@Qualifier("agentService")\r
-    private IAgentService agentService;\r
-    @Autowired\r
-    //@Qualifier("databaseService")\r
-    private IDatabaseService databaseService;\r
-    @Autowired\r
-    //@Qualifier("termService")\r
-    private ITermService termService;\r
-    //@Autowired\r
-    private HibernateTransactionManager transactionManager;\r
-    @Autowired\r
-    //@Qualifier("descriptionService")\r
-    private IDescriptionService descriptionService;\r
-    @Autowired\r
-    //@Qualifier("occurrenceService")\r
-    private IOccurrenceService occurrenceService;\r
-    @Autowired\r
-    //@Qualifier("primerService")\r
-    private IPrimerService primerService;\r
-    @Autowired\r
-    //@Qualifier("amplificationService")\r
-    private IAmplificationService amplificationService;\r
-    @Autowired\r
-    //@Qualifier("sequenceService")\r
-    private ISequenceService sequenceService;\r
-    @Autowired\r
-    //@Qualifier("mediaService")\r
-    private IMediaService mediaService;\r
-    @Autowired\r
-    //@Qualifier("commonService")\r
-    private ICommonService commonService;\r
-    @Autowired\r
-    private ILocationService locationService;\r
-    //@Autowired\r
-    private SessionFactory sessionFactory;\r
-    //@Autowired\r
-    private DataSource dataSource;\r
-    @Autowired\r
-    private ProviderManager authenticationManager;\r
-    @Autowired\r
-    private IUserService userService;\r
-    @Autowired\r
-    private IGrantedAuthorityService grantedAuthorityService;\r
-    @Autowired\r
-    private IGroupService groupService;\r
-    @Autowired\r
-    private ICollectionService collectionService;\r
-    @Autowired\r
-    private IFeatureTreeService featureTreeService;\r
-    @Autowired\r
-    private IFeatureNodeService featureNodeService;\r
-    @Autowired\r
-    private IVocabularyService vocabularyService;\r
-    @Autowired\r
-    private ITaxonNodeService taxonNodeService;\r
-    @Autowired\r
-    private IIdentificationKeyService identificationKeyService;\r
-    @Autowired\r
-    private IPolytomousKeyService polytomousKeyService;\r
-    @Autowired\r
-    private IPolytomousKeyNodeService polytomousKeyNodeService;\r
-    @Autowired\r
-    private IEntityValidationService entityValidationService;\r
-    @Autowired\r
-    private IEntityConstraintViolationService entityConstraintViolationService;\r
-    @Autowired\r
-    private ICdmPermissionEvaluator permissionEvaluator;\r
-\r
-\r
-\r
-    @Autowired\r
-    private IEditGeoService editGeoService;\r
-    @Autowired\r
-    private ICachedCommonService cachedCommonService;\r
-\r
-    @Autowired\r
-    private IWorkingSetService workingSetService;\r
-\r
-    @Autowired\r
-    protected ICdmEntitySessionManager cdmEntitySessionManager;\r
-\r
-    private IService<CdmBase> mainService;\r
 \r
     public CdmApplicationRemoteConfiguration() {}\r
 \r
@@ -198,19 +98,19 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
      * @return\r
      */\r
     public IEditGeoService getEditGeoService() {\r
-        return this.editGeoService;\r
+        return (IEditGeoService)getBean("editGeoService");\r
     }\r
 \r
     /**\r
      * @return\r
      */\r
     public ICachedCommonService getCachedCommonService(){\r
-        return this.cachedCommonService;\r
+        return (ICachedCommonService) getBean("cachedCommonService");\r
     }\r
 \r
 \r
     public ICdmEntitySessionManager getCdmEntitySessionManager() {\r
-        return this.cdmEntitySessionManager;\r
+        return (ICdmEntitySessionManager) getBean("cdmEntitySessionManager");\r
     }\r
 \r
 \r
@@ -227,103 +127,103 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
 \r
     @Override\r
     public IAgentService getAgentService(){\r
-        return this.agentService;\r
+        return (IAgentService) getBean("agentService");\r
     }\r
 \r
     @Override\r
     public IDatabaseService getDatabaseService(){\r
-        return this.databaseService;\r
+        return (IDatabaseService) getBean("databaseService");\r
     }\r
 \r
     @Override\r
     public INameService getNameService(){\r
-        return this.nameService;\r
+        return (INameService) getBean("nameService");\r
     }\r
 \r
     @Override\r
     public IReferenceService getReferenceService(){\r
-        return this.referenceService;\r
+        return (IReferenceService) getBean("referenceService");\r
     }\r
 \r
     @Override\r
     public ITaxonService getTaxonService(){\r
-        return this.taxonService;\r
+        return (ITaxonService) getBean("taxonService");\r
     }\r
 \r
     @Override\r
     public IClassificationService getClassificationService(){\r
-        return this.classificationService;\r
+        return (IClassificationService) getBean("classificationService");\r
     }\r
 \r
     @Override\r
     public ITaxonNodeService getTaxonNodeService(){\r
-        return this.taxonNodeService;\r
+        return (ITaxonNodeService) getBean("taxonNodeService");\r
     }\r
 \r
     @Override\r
     public IDescriptionService getDescriptionService(){\r
-        return this.descriptionService;\r
+        return (IDescriptionService) getBean("descriptionService");\r
     }\r
 \r
     @Override\r
     public IOccurrenceService getOccurrenceService(){\r
-        return this.occurrenceService;\r
+        return (IOccurrenceService) getBean("occurrenceService");\r
     }\r
 \r
     @Override\r
     public IPrimerService getPrimerService(){\r
-        return this.primerService;\r
+        return (IPrimerService) getBean("primerService");\r
     }\r
 \r
     @Override\r
     public IAmplificationService getAmplificationService(){\r
-        return this.amplificationService;\r
+        return (IAmplificationService) getBean("amplificationService");\r
     }\r
 \r
     @Override\r
     public ISequenceService getSequenceService(){\r
-        return this.sequenceService;\r
+        return (ISequenceService) getBean("sequenceService");\r
     }\r
 \r
     @Override\r
     public IMediaService getMediaService(){\r
-        return this.mediaService;\r
+        return (IMediaService) getBean("mediaService");\r
     }\r
 \r
     @Override\r
     public ITermService getTermService(){\r
-        return this.termService;\r
+        return (ITermService) getBean("termService");\r
     }\r
 \r
     @Override\r
     public ICommonService getCommonService(){\r
-        return this.commonService;\r
+        return (ICommonService) getBean("commonService");\r
     }\r
 \r
     @Override\r
     public ILocationService getLocationService(){\r
-        return this.locationService;\r
+        return (ILocationService) getBean("locationService");\r
     }\r
 \r
     @Override\r
     public IUserService getUserService(){\r
-        return this.userService;\r
+        return (IUserService) getBean("userService");\r
     }\r
 \r
     @Override\r
     public IGrantedAuthorityService getGrantedAuthorityService(){\r
-        return this.grantedAuthorityService;\r
+        return (IGrantedAuthorityService) getBean("grantedAuthorityService");\r
     }\r
 \r
     @Override\r
     public IService<CdmBase> getMainService(){\r
-        return this.mainService;\r
+        return (IService<CdmBase>) getBean("mainService");\r
     }\r
 \r
 \r
     @Override\r
     public ProviderManager getAuthenticationManager(){\r
-        return this.authenticationManager;\r
+        return (ProviderManager) getBean("authenticationManager");\r
     }\r
 \r
 \r
@@ -334,65 +234,65 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
 \r
     @Override\r
     public ICollectionService getCollectionService(){\r
-        return collectionService;\r
+        return (ICollectionService) getBean("collectionService");\r
     }\r
 \r
     @Override\r
     public IFeatureTreeService getFeatureTreeService(){\r
-        return featureTreeService;\r
+        return (IFeatureTreeService) getBean("featureTreeService");\r
     }\r
 \r
     @Override\r
     public IFeatureNodeService getFeatureNodeService(){\r
-        return featureNodeService;\r
+        return (IFeatureNodeService) getBean("featureNodeService");\r
     }\r
 \r
     @Override\r
     public IVocabularyService getVocabularyService(){\r
-        return vocabularyService;\r
+        return (IVocabularyService) getBean("vocabularyService");\r
     }\r
 \r
     @Override\r
     public IIdentificationKeyService getIdentificationKeyService(){\r
-        return identificationKeyService;\r
+        return (IIdentificationKeyService) getBean("identificationKeyService");\r
     }\r
 \r
     @Override\r
     public IPolytomousKeyService getPolytomousKeyService(){\r
-        return polytomousKeyService;\r
+        return (IPolytomousKeyService) getBean("polytomousKeyService");\r
     }\r
 \r
 \r
     @Override\r
     public IPolytomousKeyNodeService getPolytomousKeyNodeService(){\r
-        return polytomousKeyNodeService;\r
+        return (IPolytomousKeyNodeService) getBean("polytomousKeyNodeService");\r
     }\r
 \r
     @Override\r
     public IWorkingSetService getWorkingSetService(){\r
-        return workingSetService;\r
+        return (IWorkingSetService) getBean("workingSetService");\r
     }\r
 \r
     @Override\r
     public IGroupService getGroupService(){\r
-        return groupService;\r
+        return (IGroupService) getBean("groupService");\r
     }\r
 \r
 \r
     @Override\r
     public IEntityValidationService getEntityValidationService(){\r
-        return entityValidationService;\r
+        return (IEntityValidationService) getBean("entityValidationService");\r
     }\r
 \r
 \r
     @Override\r
     public IEntityConstraintViolationService getEntityConstraintViolationService(){\r
-        return entityConstraintViolationService;\r
+        return (IEntityConstraintViolationService) getBean("entityConstraintViolationService");\r
     }\r
 \r
     @Override\r
     public ICdmPermissionEvaluator getPermissionEvaluator(){\r
-        return permissionEvaluator;\r
+        return (ICdmPermissionEvaluator) getBean("cdmPermissionEvaluator");\r
     }\r
 \r
 \r
index e9d9a8f6776e5d35bf2d31262c6aaef7e2a0a2ce..e0749cd1994c5d89b549b6a02fa55ef3060cf64e 100644 (file)
@@ -145,11 +145,14 @@ public class CdmApplicationRemoteController  extends CdmApplicationController {
 
         GenericApplicationContext applicationContext =  new GenericApplicationContext();
 
-        int nTasks = 4;
+        int nTasks = 2;
 
         progressMonitor.beginTask("Connecting to '" + remoteSource.getName() + "'", nTasks);
 
         progressMonitor.subTask("Loading context beans ...");
+        // initialising the cdm model cache
+        CdmRemoteCacheManager.getInstance();
+
         PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
         Properties properties = new Properties();
         properties.setProperty("remoteServer", remoteSource.getServer());
@@ -170,15 +173,12 @@ public class CdmApplicationRemoteController  extends CdmApplicationController {
         }
         progressMonitor.worked(1);
 
-        progressMonitor.subTask("Refreshing / Starting context ...");
+        progressMonitor.subTask("Starting context ...");
         applicationContext.refresh();
         applicationContext.start();
-        progressMonitor.worked(1);
-
-        progressMonitor.subTask("Cleaning up ...");
         setApplicationContext(applicationContext);
         progressMonitor.worked(1);
-
+        progressMonitor.done();
         return true;
     }
 
@@ -189,16 +189,14 @@ public class CdmApplicationRemoteController  extends CdmApplicationController {
      */
     @Override
     protected void init(){
-        progressMonitor.subTask("Loading configuration ...");
-        // initialising the cdm model cache
-        CdmRemoteCacheManager.getInstance();
+
         // retrieving the application configuration
         configuration = (ICdmApplicationConfiguration)applicationContext.getBean("cdmApplicationRemoteConfiguration");
         AbstractLazyInitializer.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
         AbstractPersistentCollection.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
-        progressMonitor.worked(1);
 
-        progressMonitor.done();
+
+
     }
 
     public ICdmEntitySessionManager getCdmEntitySessionManager() {
index 02ec4b9047b0994d726056fc53dfb939e7f24e23..a0e095d91983504ed6a23b7c271a23c6e0a53b2b 100644 (file)
@@ -45,7 +45,7 @@ public class CdmModelCacher {
                        String mappedClassName = mappedClass.getName();
 
                        CdmModelFieldPropertyFromClass cmgmfc = new CdmModelFieldPropertyFromClass(mappedClassName);
-                       logger.info("Adding class : " + mappedClassName + " to cache");
+                       //logger.info("Adding class : " + mappedClassName + " to cache");
                        addGetters(persistentClass, cmgmfc);
                        cache.put(new Element(mappedClassName, cmgmfc));
                }
@@ -62,8 +62,8 @@ public class CdmModelCacher {
                    Getter getter = property.getGetter(persistentClass.getMappedClass());
                    if(getter != null && getter.getMember() != null) {
                        Field field = (Field)getter.getMember();
-                       //String getMethod = getMethodNameFromFieldName(field.getName(), field.getType().getName());
-                       logger.info(" - contains field '" + field.getName() + "' of type '" + field.getType().getName() + "'");
+
+                       //logger.info(" - contains field '" + field.getName() + "' of type '" + field.getType().getName() + "'");
                        cmgmfc.addGetMethods(field.getName());
                    }
                }
index 4ec058513280558621d6963b6456ed5d96092c2a..b787a151594dfd929661ffdbfa2ae83c0ceb3e59 100644 (file)
@@ -7,7 +7,7 @@
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">\r
 \r
 \r
-  <bean id="agentService" \r
+  <bean id="agentService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/agent.service</value>\r
@@ -21,7 +21,7 @@
     </property>\r
   </bean>\r
 \r
-  <bean id="annotationService" \r
+  <bean id="annotationService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/annotation.service</value>\r
@@ -35,7 +35,7 @@
     </property>\r
   </bean>\r
 \r
-  <bean id="auditeventService" \r
+  <bean id="auditeventService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/auditevent.service</value>\r
@@ -49,7 +49,7 @@
     </property>\r
   </bean>\r
 \r
-  <bean id="classificationService" \r
+  <bean id="classificationService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/classification.service</value>\r
@@ -63,7 +63,7 @@
     </property>\r
   </bean>\r
 \r
-  <bean id="collectionService" \r
+  <bean id="collectionService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/collection.service</value>\r
@@ -77,7 +77,7 @@
     </property>\r
   </bean>\r
 \r
-  <bean id="commonService" \r
+  <bean id="commonService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/common.service</value>\r
@@ -91,7 +91,7 @@
     </property>\r
   </bean>\r
 \r
-  <bean id="descriptionService" \r
+  <bean id="descriptionService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/description.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="editGeoService" \r
+  <bean id="editGeoService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/editgeo.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="featureNodeService" \r
+  <bean id="featureNodeService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/featurenode.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="featureTreeService" \r
+  <bean id="featureTreeService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/featuretree.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="groupService" \r
+  <bean id="groupService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/group.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="identificationKeyService" \r
+  <bean id="identificationKeyService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/identificationkey.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="locationService" \r
+  <bean id="locationService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/location.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="markerService" \r
+  <bean id="markerService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/marker.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="mediaService" \r
+  <bean id="mediaService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/media.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="nameService" \r
+  <bean id="nameService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/name.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="occurrenceService" \r
+  <bean id="occurrenceService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/occurrence.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="polytomousKeyNodeService" \r
+  <bean id="polytomousKeyNodeService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/polytomouskeynode.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="polytomousKeyService" \r
+  <bean id="polytomousKeyService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/polytomouskey.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="referenceService" \r
+  <bean id="referenceService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/reference.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <!-- <bean id="serviceService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> \r
+  <!-- <bean id="serviceService" lazy-init="true" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> \r
     <property name="serviceUrl"> <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/service.service</value> \r
     </property> <property name="serviceInterface"> <value>eu.etaxonomy.cdm.api.service.IService</value> \r
     </property> </bean> -->\r
 \r
-  <bean id="taxonNodeService" \r
+  <bean id="taxonNodeService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/taxonnode.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="taxonService" \r
+  <bean id="taxonService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/taxon.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="termService" \r
+  <bean id="termService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/term.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="userService" \r
+  <bean id="userService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting-public/user.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="vocabularyService" \r
+  <bean id="vocabularyService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/vocabulary.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="workingSetService" \r
+  <bean id="workingSetService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/workingset.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="grantedAuthorityService" \r
+  <bean id="grantedAuthorityService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/grantedauthority.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="databaseService" \r
+  <bean id="databaseService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting-public/database.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="lsidAuthorityService" \r
+  <bean id="lsidAuthorityService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/lsidauthoruty.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="lsidMetadataService" \r
+  <bean id="lsidMetadataService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/lsidmetadata.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="lsiDataService" \r
+  <bean id="lsiDataService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/lsiddata.service</value>\r
 <!--     </property> -->\r
 <!--   </bean> -->\r
 \r
-  <bean id="primerService" \r
+  <bean id="primerService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/primer.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="amplificationService" \r
+  <bean id="amplificationService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/amplification.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="sequenceService" \r
+  <bean id="sequenceService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/sequence.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="entityValidationService" \r
+  <bean id="entityValidationService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/entityvalidation.service</value>\r
     </property>\r
   </bean>\r
 \r
-  <bean id="entityConstraintViolationService" \r
+  <bean id="entityConstraintViolationService" lazy-init="true" \r
     class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
     <property name="serviceUrl">\r
       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/entityconstraintviolation.service</value>\r