Package java.sql

Examples of java.sql.SQLTransientConnectionException


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


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

    /**
     * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
                "MYTESTSTRING1", "MYTESTSTRING2", cause);
        assertNotNull(sQLTransientConnectionException);
        assertEquals(
                "The SQLState of SQLTransientConnectionException set and get should be equivalent",
                "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
        assertEquals(
                "The reason of SQLTransientConnectionException set and get should be equivalent",
                "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
        assertEquals(
                "The error code of SQLTransientConnectionException should be 0",
                sQLTransientConnectionException.getErrorCode(), 0);
        assertEquals(
                "The cause of SQLTransientConnectionException set and get should be equivalent",
                cause, sQLTransientConnectionException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_1() {
        SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
                "MYTESTSTRING1", "MYTESTSTRING2", null);
        assertNotNull(sQLTransientConnectionException);
        assertEquals(
                "The SQLState of SQLTransientConnectionException set and get should be equivalent",
                "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
        assertEquals(
                "The reason of SQLTransientConnectionException set and get should be equivalent",
                "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
        assertEquals(
                "The error code of SQLTransientConnectionException should be 0",
                sQLTransientConnectionException.getErrorCode(), 0);
        assertNull(
                "The cause of SQLTransientConnectionException should be null",
                sQLTransientConnectionException.getCause());
    }
View Full Code Here

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

    /**
     * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_3() {
        SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
                "MYTESTSTRING", null, null);
        assertNotNull(sQLTransientConnectionException);
        assertNull(
                "The SQLState of SQLTransientConnectionException should be null",
                sQLTransientConnectionException.getSQLState());
        assertEquals(
                "The reason of SQLTransientConnectionException set and get should be equivalent",
                "MYTESTSTRING", sQLTransientConnectionException.getMessage());
        assertEquals(
                "The error code of SQLTransientConnectionException should be 0",
                sQLTransientConnectionException.getErrorCode(), 0);
        assertNull(
                "The cause of SQLTransientConnectionException should be null",
                sQLTransientConnectionException.getCause());
    }
View Full Code Here

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

    /**
     * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_5() {
        SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
                null, "MYTESTSTRING", null);
        assertNotNull(sQLTransientConnectionException);
        assertEquals(
                "The SQLState of SQLTransientConnectionException set and get should be equivalent",
                "MYTESTSTRING", sQLTransientConnectionException.getSQLState());
        assertNull(
                "The reason of SQLTransientConnectionException should be null",
                sQLTransientConnectionException.getMessage());
        assertEquals(
                "The error code of SQLTransientConnectionException should be 0",
                sQLTransientConnectionException.getErrorCode(), 0);
        assertNull(
                "The cause of SQLTransientConnectionException should be null",
                sQLTransientConnectionException.getCause());
    }
View Full Code Here

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

  public static SQLException newSQLTransientConnectionException(String reason, String SQLState, int vendorCode) {
    return new SQLTransientConnectionException(reason, SQLState, vendorCode);
  }
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

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.