diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index 809b6abd657..03ea37c9f5a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -142,10 +142,7 @@ public class OperationManagerImpl implements OperationManager { @Override public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { try { - OperationManagementDAOFactory.beginTransaction(); Operation operation = operationDAO.getNextOperation(deviceId); - operation = this.lookupOperationDAO(operation.getType()).getOperation(operation.getId()); - OperationManagementDAOFactory.commitTransaction(); return operation; } catch (OperationManagementDAOException e) { try { diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql index 1ff88a169d6..0e8cd993cbd 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql @@ -40,7 +40,7 @@ CREATE TABLE IF NOT EXISTS DM_CONFIG_OPERATION ( CREATE TABLE IF NOT EXISTS DM_COMMAND_OPERATION ( OPERATION_ID INTEGER NOT NULL, - ENABLED INTEGER NOT NULL DEFAULT 0, + ENABLED BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (OPERATION_ID), CONSTRAINT fk_dm_operation_command FOREIGN KEY (OPERATION_ID) REFERENCES DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION