Package java.sql

Examples of java.sql.SQLNonTransientConnectionException


    /**
     * @test java.sql.SQLNonTransientConnectionException(String, String, int,
     *       Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_21() {
        SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
                null, null, 0, null);
        assertNotNull(sQLNonTransientConnectionException);
        assertNull(
                "The SQLState of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getSQLState());
        assertNull(
                "The reason of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getMessage());
        assertEquals(
                "The error code of SQLNonTransientConnectionException should be 0",
                sQLNonTransientConnectionException.getErrorCode(), 0);
        assertNull(
                "The cause of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getCause());
    }
View Full Code Here


     * @test java.sql.SQLNonTransientConnectionException(String, String, int,
     *       Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_22() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
                null, null, -1, cause);
        assertNotNull(sQLNonTransientConnectionException);
        assertNull(
                "The SQLState of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getSQLState());
        assertNull(
                "The reason of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getMessage());
        assertEquals(
                "The error code of SQLNonTransientConnectionException should be -1",
                sQLNonTransientConnectionException.getErrorCode(), -1);
        assertEquals(
                "The cause of SQLNonTransientConnectionException set and get should be equivalent",
                cause, sQLNonTransientConnectionException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLNonTransientConnectionException(String, String, int,
     *       Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_23() {
        SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
                null, null, -1, null);
        assertNotNull(sQLNonTransientConnectionException);
        assertNull(
                "The SQLState of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getSQLState());
        assertNull(
                "The reason of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getMessage());
        assertEquals(
                "The error code of SQLNonTransientConnectionException should be -1",
                sQLNonTransientConnectionException.getErrorCode(), -1);
        assertNull(
                "The cause of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLNonTransientConnectionException()
     */
    public void test_Constructor() {
        SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException();
        assertNotNull(sQLNonTransientConnectionException);
        assertNull(
                "The SQLState of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getSQLState());
        assertNull(
                "The reason of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getMessage());
        assertEquals(
                "The error code of SQLNonTransientConnectionException should be 0",
                sQLNonTransientConnectionException.getErrorCode(), 0);
    }
View Full Code Here

  public static SQLException newSQLInvalidAuthorizationSpecException(String reason, String SQLState, int vendorCode) {
    return new SQLInvalidAuthorizationSpecException(reason, SQLState, vendorCode);
  }

  public static SQLException newSQLNonTransientConnectionException(String reason, String SQLState, int vendorCode) {
    return new SQLNonTransientConnectionException(reason, SQLState, vendorCode);
  }
View Full Code Here

                        code, cause);
            } else {

                // the database is (permanently) shut down or the connection is
                // (permanently) closed or broken
                return new SQLNonTransientConnectionException(msg, sqlstate,
                        code, cause);
            }
        } else if (sqlstate.startsWith("22")) {
            return new SQLDataException(msg, sqlstate, code, cause);
        } else if (sqlstate.startsWith("23")) {
View Full Code Here

TOP

Related Classes of java.sql.SQLNonTransientConnectionException

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.