added logs if device type registration failed

revert-70aa11f8
ayyoob 8 years ago
parent c48f879205
commit 45c0d2d2f5

@ -272,15 +272,22 @@ public class DeviceManagementServiceComponent {
* @param deviceManagementService An instance of DeviceManagementService
*/
protected void setDeviceManagementService(DeviceManagementService deviceManagementService) {
if (log.isDebugEnabled()) {
log.debug("Setting Device Management Service Provider: '" +
deviceManagementService.getType() + "'");
}
synchronized (LOCK) {
deviceManagers.add(deviceManagementService);
for (PluginInitializationListener listener : listeners) {
listener.registerDeviceManagementService(deviceManagementService);
try {
if (log.isDebugEnabled()) {
log.debug("Setting Device Management Service Provider: '" +
deviceManagementService.getType() + "'");
}
synchronized (LOCK) {
deviceManagers.add(deviceManagementService);
for (PluginInitializationListener listener : listeners) {
listener.registerDeviceManagementService(deviceManagementService);
}
}
log.info("Device Type deployed successfully : " + deviceManagementService.getType() + " for tenant "
+ deviceManagementService.getProvisioningConfig().getProviderTenantDomain());
} catch (Throwable e) {
log.error("Failed to register device management service for device type" + deviceManagementService.getType() +
" for tenant " + deviceManagementService.getProvisioningConfig().getProviderTenantDomain(), e);
}
}

Loading…
Cancel
Save