Package com.webobjects.eocontrol

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


        catch (Throwable t) {
          throw new ERXMigrationFailedException("Failed on post migrations for model '" + modelVersion.model().name() + "'.", t);
       
      }
      finally {
        editingContext.unlock();
      }
    }
  }

  protected IERXMigrationLock databaseLockForModel(EOModel model) {
View Full Code Here


      }
      String result = createSchemaSQLForEntitiesWithOptions(entities, databaseContext, optionsCreate);
      return result;
    }
    finally {
      ec.unlock();
    }
  }

  /**
   * Creates the schema sql for a set of entities.
View Full Code Here

        if(entity != null) {
          return entity.name();
        }
        return null;
      } finally {
        ec.unlock();
      }
    }
   
    /**
     * Creates the cache for the given entity, keypath and timeout value in milliseconds.
View Full Code Here

    {
      log.error("method: execute: fetching jobs.", e);
    }
    finally
    {
      ec.unlock();
      ec.dispose();
    }
  }

  /**
 
View Full Code Here

            errorMsg = e.getMessage();
            userInfo.setObjectForKey(e, EXCEPTION_KEY);
            log.error("method: jobWasExecuted: exception when saving job description: ", e);
          } finally
          {
            ec.unlock();
          }
        }
      }

      logResult(jobexecutioncontext, errorMsg);
View Full Code Here

        }
        else {
          log.warn("Unlocking context that wasn't unlocked in RR-Loop!: " + ec);
        }
        try {
          ec.unlock();
        }
        catch (IllegalStateException ex) {
          log.error("Could not unlock EC: " + ec, ex);
        }
       
View Full Code Here

      }
      setDefaultDelegateOnEditingContext(ec, validationEnabled);
      if (!useSharedEditingContext()) {
        ec.lock();
        ec.setSharedEditingContext(null);
        ec.unlock();
      }
      NSNotificationCenter.defaultCenter().postNotification(EditingContextDidCreateNotification, ec);
      if(objectStore instanceof ERXEC) {
        ERXEC parent = (ERXEC)objectStore;
        NSNotificationCenter.defaultCenter().addObserver(ec, ERXECProcessQueuedNotificationsSelector, ERXECProcessQueuedNotificationsNotification, parent);
View Full Code Here

        try {
            framework = (Framework) framework.localInstanceIn(peer);
            framework.releaseHat();
            peer.saveChanges();
        } finally {
            peer.unlock();
        }

        return sender.context().page();
    }
}
View Full Code Here

                            "You have " + unreadBugs.count() + " unread bug(s)", emailBody, true);
                    NSLog.debug.appendln("Sending report to " + email + ": " + unreadBugs.count() + " unread bugs");
                }
            }
        } finally {
            ec.unlock();
        }
    }

}
View Full Code Here

    @Override
    protected void _run() {
      EOEditingContext ec = editingContext();
      ec.lock();
      NSArray rows = EOUtilities.objectsForEntityNamed(ec, "Employee");
      ec.unlock();
      print("RESULT", "row count = " + rows.count());
    }
  }

  public static class SimpleInsertTest extends ThrashTest {
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.