• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmrs / openmrs-module-webservices.rest / 20369290211

19 Dec 2025 11:56AM UTC coverage: 68.555% (-0.02%) from 68.577%
20369290211

push

github

rkorytkowski
RESTWS-1011: Init resources asynchronously on startup

6 of 13 new or added lines in 3 files covered. (46.15%)

1 existing line in 1 file now uncovered.

9693 of 14139 relevant lines covered (68.56%)

0.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/omod/src/main/java/org/openmrs/module/webservices/rest/Activator.java
1
/**
2
 * This Source Code Form is subject to the terms of the Mozilla Public License,
3
 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
4
 * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
5
 * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
6
 *
7
 * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
8
 * graphic logo is a trademark of OpenMRS Inc.
9
 */
10
package org.openmrs.module.webservices.rest;
11

12
import org.apache.commons.logging.Log;
13
import org.apache.commons.logging.LogFactory;
14
import org.openmrs.api.context.Context;
15
import org.openmrs.module.BaseModuleActivator;
16
import org.openmrs.module.ModuleActivator;
17
import org.openmrs.module.webservices.docs.swagger.SwaggerSpecificationCreator;
18
import org.openmrs.module.webservices.rest.util.ReflectionUtil;
19
import org.openmrs.module.webservices.rest.web.ConversionUtil;
20
import org.openmrs.module.webservices.rest.web.api.RestService;
21

22
/**
23
 * {@link ModuleActivator} for the webservices.rest module
24
 */
25
public class Activator extends BaseModuleActivator {
×
26
        
27
        private Log log = LogFactory.getLog(this.getClass());
×
28
        
29
        @Override
30
        public void started() {
31
                log.info("Started the REST Web Service module");
×
32
        }
×
33
        
34
        @Override
35
        public void stopped() {
36
                log.info("Stopped the REST Web Service module");
×
37
        }
×
38
        
39
        @Override
40
        public void contextRefreshed() {
41
                // initialize all resources and search handlers asynchronously for faster startup
NEW
42
                Context.getService(RestService.class).initializeAsync();
×
43
                
44
                log.info("Clearing caches...");
×
45
                
46
                ConversionUtil.clearCache();
×
47
                ReflectionUtil.clearCaches();
×
48
                SwaggerSpecificationCreator.clearCache();
×
49
        }
×
50
        
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc