Package liquibase.lockservice

Examples of liquibase.lockservice.LockServiceEx


   */
  @Override
  public void update(String contexts) throws LiquibaseException {
    contexts = StringUtils.trimToNull(contexts);

    LockServiceEx lockService = LockServiceEx.getInstance(database);
    lockService.waitForLock();
    try {
      getChangeLogParameters().setContexts(StringUtils.splitAndTrim(contexts, ","));

      DatabaseChangeLog changeLog = ChangeLogParserFactory.getInstance()
          .getParser(this.changeLogFile, getFileOpener())
          .parse(this.changeLogFile, getChangeLogParameters(), getFileOpener());
      checkDatabaseChangeLogTable(true, changeLog, contexts);

      changeLog.validate(database, contexts);
      ChangeLogIterator changeLogIterator = getStandardChangelogIterator(contexts, changeLog);

      changeLogIterator.run(new UpdateVisitor(database), database);
    } finally {
      try {
        lockService.releaseLock();
      } catch (LockException e) {
        LOGGER.error("Error while releasing db lock", e);
      }
    }
  }
View Full Code Here

TOP

Related Classes of liquibase.lockservice.LockServiceEx

Copyright © 2018 www.massapicom. 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.