From b2d344bad736a1b226c080dfa4d4d172dcf4a6bc Mon Sep 17 00:00:00 2001 From: harshanl Date: Mon, 30 Nov 2015 16:55:45 +0530 Subject: [PATCH 1/2] Added a method to reset the tenant config cache. --- .../carbon/device/mgt/mobile/impl/android/gcm/GCMService.java | 4 ++++ .../carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMService.java index 2113dd062f..f3ed7b8b3d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMService.java @@ -57,4 +57,8 @@ public class GCMService { log.error("Exception occurred while sending the GCM notification : " + result.getErrorMsg()); } } + + public void resetTenantConfigCache() { + GCMUtil.resetTenantConfigCache(); + } } \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java index ce08d896d5..12db04ec50 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java @@ -177,6 +177,10 @@ public class GCMUtil { return null; } + public static void resetTenantConfigCache() { + tenantConfigurationCache.remove(getTenantId()); + } + private static void addTenantConfigurationToCache(TenantConfiguration tenantConfiguration) { tenantConfigurationCache.put(getTenantId(), tenantConfiguration); } From be37d3aeb5315b5c3a9eaa2274f4faa07da6c241 Mon Sep 17 00:00:00 2001 From: Kasun Delgolla Date: Mon, 30 Nov 2015 20:18:11 +0530 Subject: [PATCH 2/2] Committing app context name change from mdm to emm --- .../device/mgt/mobile/url/printer/URLPrinterStartupHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.url.printer/src/main/java/org/wso2/carbon/device/mgt/mobile/url/printer/URLPrinterStartupHandler.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.url.printer/src/main/java/org/wso2/carbon/device/mgt/mobile/url/printer/URLPrinterStartupHandler.java index ab9d41b14c..80aa398058 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.url.printer/src/main/java/org/wso2/carbon/device/mgt/mobile/url/printer/URLPrinterStartupHandler.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.url.printer/src/main/java/org/wso2/carbon/device/mgt/mobile/url/printer/URLPrinterStartupHandler.java @@ -58,7 +58,7 @@ public class URLPrinterStartupHandler implements ServerStartupObserver { if (httpsProxyPort > 0) { port = httpsProxyPort; } - return "https://" + hostName + ":" + port + "/mdm"; + return "https://" + hostName + ":" + port + "/emm"; } }