Hibernate ORM LockAcquisitionException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM LockAcquisitionException class.

This code example shows how to use the following methods:getSQL
			QueryTimeoutException jdbcEx = (QueryTimeoutException) ex; 
			return new org.springframework.dao.QueryTimeoutException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex); 
		} 
		if (ex instanceof LockAcquisitionException) { 
			LockAcquisitionException jdbcEx = (LockAcquisitionException) ex; 
			return new CannotAcquireLockException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex); 
		} 
		if (ex instanceof PessimisticLockException) { 
			PessimisticLockException jdbcEx = (PessimisticLockException) ex; 
			return new PessimisticLockingFailureException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex); 
		} 
		if (ex instanceof ConstraintViolationException) { 
			ConstraintViolationException jdbcEx = (ConstraintViolationException) ex; 
			return new DataIntegrityViolationException(ex.getMessage()  + "; SQL [" + jdbcEx.getSQL() + 
					"]; constraint [" + jdbcEx.getConstraintName() + "]", ex); 
		} 
		if (ex instanceof DataException) { 
			DataException jdbcEx = (DataException) ex; 
			return new DataIntegrityViolationException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex); 
		} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
   @RetryTransaction(7) 
   public void retryFive() { 
      logger.info("retryFive:: start");
      counter++;
      if (counter < 5) {
         throw new LockAcquisitionException("sample dal exception",
               new SQLException("1111"));
      } 
   } 
 
   @Override 
   @Transactional 
   @RetryTransaction(10) 
   public void retryForever() { 
      logger.info("retryForever:: start");
      throw new LockAcquisitionException("sample dal exception",
            new SQLException("1111"));
   } 
 
   /* (non-Javadoc) 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
				return new LockAcquisitionException( message, sqlException, sql );
			} 
 
			if ( "61000".equals( sqlState ) ) {
				// oracle sql-state code for deadlock 
				return new LockAcquisitionException( message, sqlException, sql );
			} 
 
			if ( "40XL1".equals( sqlState ) || "40XL2".equals( sqlState )) {
				// Derby "A lock could not be obtained within the time requested." 
				return new PessimisticLockException( message, sqlException, sql );
			} 
 
			// MySQL Query execution was interrupted 
			if ( "70100".equals( sqlState ) ||
				// Oracle user requested cancel of current operation 
				  "72000".equals( sqlState ) ) {
				throw new QueryTimeoutException(  message, sqlException, sql );
			} 
		} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSQL
      return new InvalidDataAccessResourceUsageException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]",
          ex);
    } 
    if (ex instanceof LockAcquisitionException) {
      LockAcquisitionException jdbcEx = (LockAcquisitionException) ex;
      return new CannotAcquireLockException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex);
    } 
    if (ex instanceof ConstraintViolationException) {
      ConstraintViolationException jdbcEx = (ConstraintViolationException) ex;
      return new DataIntegrityViolationException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL()
          + "]; constraint [" + jdbcEx.getConstraintName() + "]", ex);
    } 
    if (ex instanceof DataException) {
      DataException jdbcEx = (DataException) ex;
      return new DataIntegrityViolationException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex);
    } 
    if (ex instanceof NonUniqueResultException) { return new IncorrectResultSizeDataAccessException(
        ex.getMessage(), 1, ex); }
    if (ex instanceof NonUniqueObjectException) { return new DuplicateKeyException(ex.getMessage(), ex); }
    if (ex instanceof PropertyValueException) { return new DataIntegrityViolationException(ex.getMessage(),
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java