Package org.hibernate.exception

Examples of org.hibernate.exception.LockTimeoutException


        // lock timeouts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        if ( errorCode == 30006 ) {
          // ORA-30006: resource busy; acquire with WAIT timeout expired
          throw new LockTimeoutException( message, sqlException, sql );
        }
        else if ( errorCode == 54 ) {
          // ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
          throw new LockTimeoutException( message, sqlException, sql );
        }
        else if ( 4021 == errorCode ) {
          // ORA-04021 timeout occurred while waiting to lock object
          throw new LockTimeoutException( message, sqlException, sql );
        }


        // deadlocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
View Full Code Here


      public JDBCException convert(SQLException sqlException, String message, String sql) {
        final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException );
        final int errorCode = JdbcExceptionHelper.extractErrorCode( sqlException );

        if( -952 == errorCode && "57014".equals( sqlState )){
          throw new LockTimeoutException( message, sqlException, sql );
        }
        return null;
      }
    };
  }
View Full Code Here

        // lock timeouts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        if ( errorCode == 30006 ) {
          // ORA-30006: resource busy; acquire with WAIT timeout expired
          throw new LockTimeoutException( message, sqlException, sql );
        }
        else if ( errorCode == 54 ) {
          // ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
          throw new LockTimeoutException( message, sqlException, sql );
        }
        else if ( 4021 == errorCode ) {
          // ORA-04021 timeout occurred while waiting to lock object
          throw new LockTimeoutException( message, sqlException, sql );
        }


        // deadlocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
View Full Code Here

TOP

Related Classes of org.hibernate.exception.LockTimeoutException

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.