Package java.sql

Examples of java.sql.SQLTransientConnectionException


            ex = new SQLException(message, sqlState, errCode);
        } else if (sqlState.startsWith(SQLState.CONNECTIVITY_PREFIX) ||
            errCode >= ExceptionSeverity.SESSION_SEVERITY) {
            //none of the sqlstate supported by derby belongs to
            //NonTransientConnectionException
            ex = new SQLTransientConnectionException(message, sqlState, errCode);
        } else if (sqlState.startsWith(SQLState.SQL_DATA_PREFIX)) {
            ex = new SQLDataException(message, sqlState, errCode);
        } else if (sqlState.startsWith(SQLState.INTEGRITY_VIOLATION_PREFIX)) {
            ex = new SQLIntegrityConstraintViolationException(message, sqlState,
                    errCode);
View Full Code Here


        final SQLException ex;
        if (sqlState.startsWith(SQLState.CONNECTIVITY_PREFIX)) {
            //none of the sqlstate supported by derby belongs to
            //NonTransientConnectionException
            ex = new SQLTransientConnectionException(message, sqlState,
                    severity, t);
        } else if (sqlState.startsWith(SQLState.SQL_DATA_PREFIX)) {
            ex = new SQLDataException(message, sqlState, severity, t);
        } else if (sqlState.startsWith(SQLState.INTEGRITY_VIOLATION_PREFIX)) {
            ex = new SQLIntegrityConstraintViolationException(message, sqlState,
View Full Code Here

        final SQLException ex;
        if (sqlState.startsWith(SQLState.CONNECTIVITY_PREFIX)) {
            //none of the sqlstate supported by derby belongs to
            //NonTransientConnectionException
            ex = new SQLTransientConnectionException(message, sqlState,
                    severity, t);
        } else if (sqlState.startsWith(SQLState.SQL_DATA_PREFIX)) {
            ex = new SQLDataException(message, sqlState, severity, t);
        } else if (sqlState.startsWith(SQLState.INTEGRITY_VIOLATION_PREFIX)) {
            ex = new SQLIntegrityConstraintViolationException(message, sqlState,
View Full Code Here

            ex = new SQLException(message, sqlState, errCode);
        } else if (sqlState.startsWith(SQLState.CONNECTIVITY_PREFIX) ||
            errCode >= ExceptionSeverity.SESSION_SEVERITY) {
            //none of the sqlstate supported by derby belongs to
            //NonTransientConnectionException
            ex = new SQLTransientConnectionException(message, sqlState, errCode);
        } else if (sqlState.startsWith(SQLState.SQL_DATA_PREFIX)) {
            ex = new SQLDataException(message, sqlState, errCode);
        } else if (sqlState.startsWith(SQLState.INTEGRITY_VIOLATION_PREFIX)) {
            ex = new SQLIntegrityConstraintViolationException(message, sqlState,
                    errCode);
View Full Code Here

 
  @Test
  public void indicatesFailureSQLException()
  {
    assertTrue(this.dialect.indicatesFailure(new SQLNonTransientConnectionException()));
    assertTrue(this.dialect.indicatesFailure(new SQLTransientConnectionException()));
    int i = 0;
    char[] alphabet = new char[36];
    for (char c = '0'; c <= '9'; ++c)
    {
      alphabet[i++] = c;
View Full Code Here

 
  @Test
  public void indicatesFailureSQLException()
  {
    assertTrue(this.dialect.indicatesFailure(new SQLNonTransientConnectionException()));
    assertTrue(this.dialect.indicatesFailure(new SQLTransientConnectionException()));
    int i = 0;
    char[] alphabet = new char[36];
    for (char c = '0'; c <= '9'; ++c)
    {
      alphabet[i++] = c;
View Full Code Here

                // then, e.g. - the database may spuriously cease to be "in use"
                //              upon retry
                //            - the network configuration, server availability
                //              may change spuriously
                //            - keystore location/content may change spuriously
                return new SQLTransientConnectionException(msg, sqlstate,
                        code, cause);
            } else {

                // the database is (permanently) shut down or the connection is
                // (permanently) closed or broken
View Full Code Here

    SQLException ex = new SQLException(message, sqlState, severity, t);
        if (sqlState.startsWith(SQLState.CONNECTIVITY_PREFIX)) {
            //none of the sqlstate supported by derby belongs to
            //NonTransientConnectionException
            ex = new SQLTransientConnectionException(message, sqlState,
                    severity, t);
        } else if (sqlState.startsWith(SQLState.SQL_DATA_PREFIX)) {
            ex = new SQLDataException(message, sqlState, severity, t);
        } else if (sqlState.startsWith(SQLState.INTEGRITY_VIOLATION_PREFIX)) {
            ex = new SQLIntegrityConstraintViolationException(message, sqlState,
View Full Code Here

                // then, e.g. - the database may spuriously cease to be "in use"
                //              upon retry
                //            - the network configuration, server availability
                //              may change spuriously
                //            - keystore location/content may change spuriously
                return new SQLTransientConnectionException(msg, sqlstate,
                        code, cause);
            } else {

                // the database is (permanently) shut down or the connection is
                // (permanently) closed or broken
View Full Code Here

    } else if (detail.startsWith("retry")) {
      return new SQLTransientException("Retriable Vtocc exception: " + detail, e);
    } else if (detail.startsWith("fatal")) {
      return new SQLNonTransientException("Fatal Vtocc exception: " + detail, e);
    } else if (detail.startsWith("tx_pool_full")) {
      return new SQLTransientConnectionException(
          "Pool exhausted Vtocc exception: " + detail, e);
    }
    Matcher errNoMatcher = Pattern.compile("\\(errno (\\d+)\\)").matcher(detail);
    if (errNoMatcher.find()) {
      return new SQLException(
View Full Code Here

TOP

Related Classes of java.sql.SQLTransientConnectionException

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.