Project

General

Profile

« Previous | Next » 

Revision abce4859

Added by Cherian Mathew almost 9 years ago

CdmApplicationRemoteController : moved cdm model caching to start before application context init
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

View differences:

eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java
145 145

  
146 146
        GenericApplicationContext applicationContext =  new GenericApplicationContext();
147 147

  
148
        int nTasks = 4;
148
        int nTasks = 2;
149 149

  
150 150
        progressMonitor.beginTask("Connecting to '" + remoteSource.getName() + "'", nTasks);
151 151

  
152 152
        progressMonitor.subTask("Loading context beans ...");
153
        // initialising the cdm model cache
154
        CdmRemoteCacheManager.getInstance();
155

  
153 156
        PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
154 157
        Properties properties = new Properties();
155 158
        properties.setProperty("remoteServer", remoteSource.getServer());
......
170 173
        }
171 174
        progressMonitor.worked(1);
172 175

  
173
        progressMonitor.subTask("Refreshing / Starting context ...");
176
        progressMonitor.subTask("Starting context ...");
174 177
        applicationContext.refresh();
175 178
        applicationContext.start();
176
        progressMonitor.worked(1);
177

  
178
        progressMonitor.subTask("Cleaning up ...");
179 179
        setApplicationContext(applicationContext);
180 180
        progressMonitor.worked(1);
181

  
181
        progressMonitor.done();
182 182
        return true;
183 183
    }
184 184

  
......
189 189
     */
190 190
    @Override
191 191
    protected void init(){
192
        progressMonitor.subTask("Loading configuration ...");
193
        // initialising the cdm model cache
194
        CdmRemoteCacheManager.getInstance();
192

  
195 193
        // retrieving the application configuration
196 194
        configuration = (ICdmApplicationConfiguration)applicationContext.getBean("cdmApplicationRemoteConfiguration");
197 195
        AbstractLazyInitializer.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
198 196
        AbstractPersistentCollection.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
199
        progressMonitor.worked(1);
200 197

  
201
        progressMonitor.done();
198

  
199

  
202 200
    }
203 201

  
204 202
    public ICdmEntitySessionManager getCdmEntitySessionManager() {

Also available in: Unified diff