From 2380a22d53cdfbb321d9f15cfa8aa9aea017bc61 Mon Sep 17 00:00:00 2001 From: charitha Date: Mon, 21 Jan 2019 15:36:42 +0530 Subject: [PATCH] Commit transaction after changing status --- .../mgt/core/service/DeviceManagementProviderServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index 97bbef7b6aa..07642b8c54b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -2756,6 +2756,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv try { DeviceManagementDAOFactory.openConnection(); success = deviceDAO.setEnrolmentStatusInBulk(deviceType, status, tenantId, deviceList); + DeviceManagementDAOFactory.commitTransaction(); } catch (DeviceManagementDAOException e) { String msg = "Error occurred in while updating status of devices :" +deviceType + " status : " + deviceList.toString(); log.error(msg, e);