Package com.webobjects.eocontrol

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


      if (entityName == null) {
        entityName = ERXRestClassDescriptionFactory.entityNameForObject(record);
      }
      EOEditingContext editingContext = ERXEC.newEditingContext();
      Object entityID = IERXRestDelegate.Factory.delegateForEntityNamed(entityName).primaryKeyForObject(record, new ERXRestContext(editingContext));
      editingContext.dispose();
      linkUrl = ERXRouteUrlUtils.actionUrlForEntity(context(), entityName, entityID, action, format, queryParameters, secure, includeSessionID);
    }
    else {
      String entityName = (String) valueForBinding("entityName");
      String id = (String) valueForBinding("id");
View Full Code Here


          }
          editingContext.saveChanges();
        }
        finally {
          transactionManager.removeTransaction(transaction);
          editingContext.dispose();
        }
      }
      finally {
        context.session();
      }
View Full Code Here

        person.localInstanceIn(editingContext).setEmailDeliveryFailure(Boolean.TRUE);
        editingContext.saveChanges();
      } finally {
        editingContext.unlock();
      }
      editingContext.dispose();
      SPUtilities.log.error("Failed to send email to '" + person.emailAddress() + "'.", e);
      errorNoticeList.addNotice("Failed to send email: " + e.getMessage());
    }
    return sentEmail;
  }
View Full Code Here

                        EOEnterpriseObject object = EOUtilities.localInstanceOfObject(ec, _object);
                        ec.deleteObject(object);
                        ec.saveChanges();
                    } finally {
                        ec.unlock();
                        ec.dispose();
                    }
                } else {
                  //Place the EO into a nested ec and try to delete there
                  //to prevent the appearance of a successful delete if
                  //validation fails.
View Full Code Here

      try {
        SPPerson person = (SPPerson) ERXEOControlUtilities.convertGIDtoEO(editingContext, _personGID);
        _errorNoticeList.addNotice("Failed to send an email to '" + person.emailAddress() + "'.");
      } finally {
        editingContext.unlock();
        editingContext.dispose();
      }
    }

    public void deliverySucceeded(ERMessage message) {
      EOEditingContext editingContext = ERXEC.newEditingContext();
View Full Code Here

        SPPerson person = (SPPerson) ERXEOControlUtilities.convertGIDtoEO(editingContext, _personGID);
        person.setEmailDeliveryFailure(Boolean.FALSE);
        editingContext.saveChanges();
      } finally {
        editingContext.unlock();
        editingContext.dispose();
      }
    }

    public void deliveryFailed(ERMessage message, Throwable failure) {
      EOEditingContext editingContext = ERXEC.newEditingContext();
View Full Code Here

        _errorNoticeList.addNotice("Failed to send an email to '" + person.emailAddress() + "'.");
        person.setEmailDeliveryFailure(Boolean.TRUE);
        editingContext.saveChanges();
      } finally {
        editingContext.unlock();
        editingContext.dispose();
      }
      log.error("Failed to send email.", failure);
    }
  }
}
View Full Code Here

        removeAttribute(attribute);
                } catch (Exception e1) {
                   
                } finally {
                    ec.unlock();
                    ec.dispose();
                   
                }
      }
  }
    }
View Full Code Here

                        EOEnterpriseObject object = EOUtilities.localInstanceOfObject(ec, object());
                        ec.deleteObject(object);
                        ec.saveChanges();
                    } finally {
                        ec.unlock();
                        ec.dispose();
                    }
                } else {
                    editingContext.deleteObject(object());
                    if (ERXEOControlUtilities.isNewObject(object())) {
                        // This is necessary to force state synching, e.g., for display groups, etc.
View Full Code Here

    try {
      ERXRestRequestNode node = parse(str, new ERXRestContext(editingContext));
      return node;
    }
    finally {
      editingContext.dispose();
    }
  }

  /**
   * Returns a parsed ERXRestRequestNode using this format's parser.
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.