|
|
@ -120,19 +120,11 @@ public class OperationManagerImpl implements OperationManager {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
List<Operation> operations = new ArrayList<Operation>();
|
|
|
|
List<Operation> operations = new ArrayList<Operation>();
|
|
|
|
|
|
|
|
|
|
|
|
OperationManagementDAOFactory.beginTransaction();
|
|
|
|
|
|
|
|
operations.addAll(profileOperationDAO.getOperations(deviceId, Operation.Status.PENDING));
|
|
|
|
operations.addAll(profileOperationDAO.getOperations(deviceId, Operation.Status.PENDING));
|
|
|
|
operations.addAll(configOperationDAO.getOperations(deviceId, Operation.Status.PENDING));
|
|
|
|
operations.addAll(configOperationDAO.getOperations(deviceId, Operation.Status.PENDING));
|
|
|
|
operations.addAll(commandOperationDAO.getOperations(deviceId, Operation.Status.PENDING));
|
|
|
|
operations.addAll(commandOperationDAO.getOperations(deviceId, Operation.Status.PENDING));
|
|
|
|
OperationManagementDAOFactory.commitTransaction();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return operations;
|
|
|
|
return operations;
|
|
|
|
} catch (OperationManagementDAOException e) {
|
|
|
|
} catch (OperationManagementDAOException e) {
|
|
|
|
try {
|
|
|
|
|
|
|
|
OperationManagementDAOFactory.rollbackTransaction();
|
|
|
|
|
|
|
|
} catch (OperationManagementDAOException e1) {
|
|
|
|
|
|
|
|
log.warn("Error occurred while roll-backing the transaction", e1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
throw new OperationManagementException("Error occurred while retrieving the list of " +
|
|
|
|
throw new OperationManagementException("Error occurred while retrieving the list of " +
|
|
|
|
"pending operations assigned for '" + deviceId.getType() + "' device '" +
|
|
|
|
"pending operations assigned for '" + deviceId.getType() + "' device '" +
|
|
|
|
deviceId.getId() + "'", e);
|
|
|
|
deviceId.getId() + "'", e);
|
|
|
|