|
|
@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory;
|
|
|
|
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
|
|
|
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.InvalidConfigurationException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager;
|
|
|
|
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager;
|
|
|
@ -153,9 +154,13 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis
|
|
|
|
OperationManager operationManager = operationManagerRepository.getOperationManager(
|
|
|
|
OperationManager operationManager = operationManagerRepository.getOperationManager(
|
|
|
|
deviceTypeIdentifier);
|
|
|
|
deviceTypeIdentifier);
|
|
|
|
if (operationManager != null) {
|
|
|
|
if (operationManager != null) {
|
|
|
|
NotificationStrategy notificationStrategy = operationManager.getNotificationStrategy();
|
|
|
|
try {
|
|
|
|
if (notificationStrategy != null) {
|
|
|
|
NotificationStrategy notificationStrategy = operationManager.getNotificationStrategy();
|
|
|
|
notificationStrategy.undeploy();
|
|
|
|
if (notificationStrategy != null) {
|
|
|
|
|
|
|
|
notificationStrategy.undeploy();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (InvalidConfigurationException ignore) {
|
|
|
|
|
|
|
|
//error occurred while undeploying strategy, ignore error
|
|
|
|
}
|
|
|
|
}
|
|
|
|
operationManagerRepository.removeOperationManager(deviceTypeIdentifier);
|
|
|
|
operationManagerRepository.removeOperationManager(deviceTypeIdentifier);
|
|
|
|
}
|
|
|
|
}
|
|
|
|