Update Operations Begin transactions before update DB

4.x.x
manoj 10 years ago
parent fc5be1d059
commit 0f55d86b08

@ -153,9 +153,10 @@ public class OperationManagerImpl implements OperationManager {
public void updateOperation(int operationId, Operation.Status operationStatus) public void updateOperation(int operationId, Operation.Status operationStatus)
throws OperationManagementException { throws OperationManagementException {
try { try {
OperationManagementDAOFactory.beginTransaction();
Operation operation = operationDAO.getOperation(operationId); Operation operation = operationDAO.getOperation(operationId);
operation.setStatus(operationStatus); operation.setStatus(operationStatus);
OperationManagementDAOFactory.beginTransaction();
operationDAO.updateOperation(operation); operationDAO.updateOperation(operation);
OperationManagementDAOFactory.commitTransaction(); OperationManagementDAOFactory.commitTransaction();
}catch(OperationManagementDAOException ex){ }catch(OperationManagementDAOException ex){

Loading…
Cancel
Save