Package org.hibernate

Examples of org.hibernate.QueryTimeoutException


        // query cancelled ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        if ( 1013 == errorCode ) {
          // ORA-01013: user requested cancel of current operation
          throw new QueryTimeoutExceptionmessage, sqlException, sql );
        }


        // data integrity violation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
View Full Code Here


      // MySQL Query execution was interrupted
      if ( "70100".equals( sqlState ) ||
          // Oracle user requested cancel of current operation
          ( "72000".equals( sqlState ) && errorCode == 1013 ) ) {
        throw new QueryTimeoutExceptionmessage, sqlException, sql );
      }
    }

    return null;
  }
View Full Code Here

    }
    else if ( SQLSyntaxErrorException.class.isInstance( sqlException ) ) {
      return new SQLGrammarException( message, sqlException, sql );
    }
    else if ( SQLTimeoutException.class.isInstance( sqlException ) ) {
      return new QueryTimeoutException( message, sqlException, sql );
    }
    else if ( SQLTransactionRollbackException.class.isInstance( sqlException ) ) {
      // Not 100% sure this is completely accurate.  The JavaDocs for SQLTransactionRollbackException state that
      // it indicates sql states starting with '40' and that those usually indicate that:
      //    <quote>
View Full Code Here

      // MySQL Query execution was interrupted
      if ( "70100".equals( sqlState ) ||
        // Oracle user requested cancel of current operation
          "72000".equals( sqlState ) ) {
        throw new QueryTimeoutExceptionmessage, sqlException, sql );
      }
    }

    return null;
  }
View Full Code Here

    }
    else if ( SQLSyntaxErrorException.class.isInstance( sqlException ) ) {
      return new SQLGrammarException( message, sqlException, sql );
    }
    else if ( SQLTimeoutException.class.isInstance( sqlException ) ) {
      return new QueryTimeoutException( message, sqlException, sql );
    }
    else if ( SQLTransactionRollbackException.class.isInstance( sqlException ) ) {
      // Not 100% sure this is completely accurate.  The JavaDocs for SQLTransactionRollbackException state that
      // it indicates sql states starting with '40' and that those usually indicate that:
      //    <quote>
View Full Code Here

      // MySQL Query execution was interrupted
      if ( "70100".equals( sqlState ) ||
        // Oracle user requested cancel of current operation
          "72000".equals( sqlState ) ) {
        throw new QueryTimeoutExceptionmessage, sqlException, sql );
      }
    }

    return handledNonSpecificException( sqlException, message, sql );
  }
View Full Code Here

        // query cancelled ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        if ( 1013 == errorCode ) {
          // ORA-01013: user requested cancel of current operation
          throw new QueryTimeoutExceptionmessage, sqlException, sql );
        }


        return null;
      }
View Full Code Here

      @Override
      public JDBCException convert(SQLException sqlException, String message, String sql) {
        final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException );
        final int errorCode = JdbcExceptionHelper.extractErrorCode( sqlException );
        if ( "HY008".equals( sqlState ) ) {
          throw new QueryTimeoutException( message, sqlException, sql );
        }
        if (1222 == errorCode ) {
          throw new LockTimeoutException( message, sqlException, sql );
        }
        return null;
View Full Code Here

      // MySQL Query execution was interrupted
      if ( "70100".equals( sqlState ) ||
        // Oracle user requested cancel of current operation
          "72000".equals( sqlState ) ) {
        throw new QueryTimeoutExceptionmessage, sqlException, sql );
      }
    }

    return null;
  }
View Full Code Here

      // MySQL Query execution was interrupted
      if ( "70100".equals( sqlState ) ||
        // Oracle user requested cancel of current operation
          "72000".equals( sqlState ) ) {
        throw new QueryTimeoutExceptionmessage, sqlException, sql );
      }
    }

    return handledNonSpecificException( sqlException, message, sql );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.QueryTimeoutException

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.