Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOEditingContext.saveChanges()


            log.debug(_childCurrentNumber + " is not a prime number but is a COMPOSITE number.");
            resultItem.setIsPrime(Boolean.FALSE);
          }
         
          // We could save changes once per child task, but let's do this to keep EOF busy for the demo.
          ec.saveChanges();
         
          // Update our number to check
          _childCurrentNumber++;
         
          // Update parent task count statistic
View Full Code Here


        } else {
          log.debug(_numberToCheck + " is not a prime number but is a COMPOSITE number.");
          resultItem.setIsPrime(Boolean.FALSE);
        }
       
        ec.saveChanges();
       
        _elapsedTime = System.currentTimeMillis() - startTime;
       
        // Update progress variables
        _count++;
View Full Code Here

      // Complete the stats
      taskInfo.setEndNumber(_numberToCheck - 1);
      taskInfo.setEndTime(new NSTimestamp());
      taskInfo.setWorkflowState(TaskInfo.WORKFLOW_PRIME_CHECKED);
     
      ec.saveChanges();
     
      _resultGid = ec.globalIDForObject(taskInfo);
     
    } finally {
      ec.unlock();
View Full Code Here

      ec.lock();
      try {
        TaskInfo taskInfo = (TaskInfo) ec.faultForGlobalID(_taskInfoGID, ec);
        taskInfo.setStartTime(new NSTimestamp(startTime));
        taskInfo.setDuration(Long.valueOf(taskInfo.endTime().getTime() - startTime));
        ec.saveChanges();
      } finally {
        ec.unlock();
      }
    }
View Full Code Here

        for (ResultItem resultItem : batch) {
          resultItem.setWorkflowState(ResultItem.WORKFLOW_CHECKING_FACTORIAL);
          performFactorialProcessing(resultItem);
          resultItem.setWorkflowState(ResultItem.WORKFLOW_PROCESSING_COMPLETE);

          ec.saveChanges();
         
         
          _elapsedTime = System.currentTimeMillis() - startTime;
         
          // Update progress variables
View Full Code Here

            else
              object().validateForUpdate();
          }
            if (object()!=null && shouldSaveChanges() && ec.hasChanges()) {
                try {
                    ec.saveChanges();
                } catch (RuntimeException e) {
                    if( shouldRevertUponSaveFailure() ) {
                        shouldRevert = true;
                    }
                    throw e;
View Full Code Here

                digest.takeValueForKey(parts.get(2), "rname");
                digest.takeValueForKey(result, "result");
            }
        }

        ec.saveChanges();

        boxResults = null;
        return context().page();
    }
}
View Full Code Here

            WOResponse response = requestHandler.handleRequest(recordRequest);
            if (response.status() < 200 || response.status() > 299) {
              throw new RuntimeException("Transaction failed: " + response.contentString());
            }
          }
          editingContext.saveChanges();
        }
        finally {
          transactionManager.removeTransaction(transaction);
          editingContext.dispose();
        }
View Full Code Here

                eo.takeValueForKey(message, "message");
                result.addObjectToBothSidesOfRelationshipWithKey(eo, "failures");
            }
        }

        ec.saveChanges();
        log.debug("Ok!");
    }
}
View Full Code Here

      sentEmail = true;
    } catch (Exception e) {
      EOEditingContext editingContext = ERXEC.newEditingContext();
      try {
        person.localInstanceIn(editingContext).setEmailDeliveryFailure(Boolean.TRUE);
        editingContext.saveChanges();
      } finally {
        editingContext.unlock();
      }
      editingContext.dispose();
      SPUtilities.log.error("Failed to send email to '" + person.emailAddress() + "'.", e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.