Examples of QueryTimeoutException


Examples of nexj.core.persistence.QueryTimeoutException

    */
   public PersistenceException getException(SQLException e, Work[] workArray, int nStart, int nEnd)
   {
      if (isQueryTimeoutException(e))
      {
         return new QueryTimeoutException(e);
      }

      if (isDuplicateKeyException(e))
      {
         Instance firstInstance = null;
View Full Code Here

Examples of org.datanucleus.store.query.QueryTimeoutException

                {
                    throw new QueryInterruptedException("Query has been interrupted", sqle);
                }
                else if (((RDBMSAdapter)storeMgr.getDatastoreAdapter()).isStatementTimeout(sqle))
                {
                    throw new QueryTimeoutException("Query has been timed out", sqle);
                }
                throw new NucleusException(LOCALISER.msg("021042"), sqle);
            }

            if (NucleusLogger.QUERY.isDebugEnabled())
View Full Code Here

Examples of org.datanucleus.store.query.QueryTimeoutException

                {
                    throw new QueryInterruptedException("Query has been interrupted", sqle);
                }
                else if (((RDBMSAdapter)storeMgr.getDatastoreAdapter()).isStatementTimeout(sqle))
                {
                    throw new QueryTimeoutException("Query has been timed out", sqle);
                }
                throw new NucleusException(LOCALISER.msg("021042"), sqle);
            }

            if (NucleusLogger.QUERY.isDebugEnabled())
View Full Code Here

Examples of org.datanucleus.store.query.QueryTimeoutException

    return new NucleusObjectNotFoundException(
        "Could not retrieve entity of kind " + key.getKind() + " with key " + key);
  }

  public static QueryTimeoutException wrapDatastoreTimeoutExceptionForQuery(DatastoreTimeoutException e) {
    QueryTimeoutException qte = new QueryTimeoutException(e.getMessage());
    qte.initCause(e);
    return qte;
  }
View Full Code Here

Examples of org.hibernate.QueryTimeoutException

    if ( index >= topDocs.scoreDocs.length ) {
      updateTopDocs( 2 * index );
    }
    //if the refresh timed out, raise an exception
    if ( timeoutManager.isTimedOut() && index >= topDocs.scoreDocs.length ) {
      throw new QueryTimeoutException("Timeout period exceeded. Cannot load document: " + index, (SQLException) null, preparedQuery.toString() );
    }
    return topDocs.scoreDocs[index];
  }
View Full Code Here

Examples of org.hibernate.QueryTimeoutException

    }
    else {
      final long elapsedTime = currentTime - start;
      timedOut = elapsedTime > timeout;
      if ( this.type != Type.LIMIT  ) {
        throw new QueryTimeoutException(
            "Full-text query took longer than expected (in microsecond): " + TimeUnit.NANOSECONDS.toMicros( elapsedTime ),
            ( SQLException) null,
            luceneQuery.toString()
        );
      }
View Full Code Here

Examples of org.hibernate.QueryTimeoutException

      //we stop where we are return what we have
      this.partialResults = true;
    }
    else {
      if ( e == null) {
        e = new QueryTimeoutException( "Timeout period exceeded", (SQLException) null, luceneQuery.toString() );
      }
      throw e;
    }
  }
View Full Code Here

Examples of org.hibernate.QueryTimeoutException

    }
    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

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

Examples of org.hibernate.QueryTimeoutException

      @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
TOP
Copyright © 2018 www.massapi.com. 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.