Package org.springframework.dao

Examples of org.springframework.dao.TransientDataAccessResourceException


      }
      else if (DATA_ACCESS_RESOURCE_FAILURE_CODES.contains(classCode)) {
        return new DataAccessResourceFailureException(buildMessage(task, sql, ex), ex);
      }
      else if (TRANSIENT_DATA_ACCESS_RESOURCE_CODES.contains(classCode)) {
        return new TransientDataAccessResourceException(buildMessage(task, sql, ex), ex);
      }
      else if (CONCURRENCY_FAILURE_CODES.contains(classCode)) {
        return new ConcurrencyFailureException(buildMessage(task, sql, ex), ex);
      }
    }
View Full Code Here


          logTranslation(task, sql, sqlEx, false);
          return new DataAccessResourceFailureException(buildMessage(task, sql, sqlEx), sqlEx);
        }
        else if (Arrays.binarySearch(this.sqlErrorCodes.getTransientDataAccessResourceCodes(), errorCode) >= 0) {
          logTranslation(task, sql, sqlEx, false);
          return new TransientDataAccessResourceException(buildMessage(task, sql, sqlEx), sqlEx);
        }
        else if (Arrays.binarySearch(this.sqlErrorCodes.getCannotAcquireLockCodes(), errorCode) >= 0) {
          logTranslation(task, sql, sqlEx, false);
          return new CannotAcquireLockException(buildMessage(task, sql, sqlEx), sqlEx);
        }
View Full Code Here

  @Override
  protected DataAccessException doTranslate(String task, String sql, SQLException ex) {
    if (ex instanceof SQLTransientException) {
      if (ex instanceof SQLTransientConnectionException) {
        return new TransientDataAccessResourceException(buildMessage(task, sql, ex), ex);
      }
      else if (ex instanceof SQLTransactionRollbackException) {
        return new ConcurrencyFailureException(buildMessage(task, sql, ex), ex);
      }
      else if (ex instanceof SQLTimeoutException) {
View Full Code Here

      }
      else if (DATA_ACCESS_RESOURCE_FAILURE_CODES.contains(classCode)) {
        return new DataAccessResourceFailureException(buildMessage(task, sql, ex), ex);
      }
      else if (TRANSIENT_DATA_ACCESS_RESOURCE_CODES.contains(classCode)) {
        return new TransientDataAccessResourceException(buildMessage(task, sql, ex), ex);
      }
      else if (CONCURRENCY_FAILURE_CODES.contains(classCode)) {
        return new ConcurrencyFailureException(buildMessage(task, sql, ex), ex);
      }
    }
View Full Code Here

          logTranslation(task, sql, sqlEx, false);
          return new DataAccessResourceFailureException(buildMessage(task, sql, sqlEx), sqlEx);
        }
        else if (Arrays.binarySearch(this.sqlErrorCodes.getTransientDataAccessResourceCodes(), errorCode) >= 0) {
          logTranslation(task, sql, sqlEx, false);
          return new TransientDataAccessResourceException(buildMessage(task, sql, sqlEx), sqlEx);
        }
        else if (Arrays.binarySearch(this.sqlErrorCodes.getCannotAcquireLockCodes(), errorCode) >= 0) {
          logTranslation(task, sql, sqlEx, false);
          return new CannotAcquireLockException(buildMessage(task, sql, sqlEx), sqlEx);
        }
View Full Code Here

    if (ex instanceof SQLTransientException) {
      if (ex instanceof SQLTransactionRollbackException) {
        return new ConcurrencyFailureException(buildMessage(task, sql, ex), ex);
      }
      if (ex instanceof SQLTransientConnectionException) {
        return new TransientDataAccessResourceException(buildMessage(task, sql, ex), ex);
      }
      if (ex instanceof SQLTimeoutException) {
        return new TransientDataAccessResourceException(buildMessage(task, sql, ex), ex);
      }
    }
    else if (ex instanceof SQLNonTransientException) {
      if (ex instanceof SQLDataException) {
        return new DataIntegrityViolationException(buildMessage(task, sql, ex), ex);
View Full Code Here

TOP

Related Classes of org.springframework.dao.TransientDataAccessResourceException

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.