Package com.alibaba.druid.pool

Examples of com.alibaba.druid.pool.DruidPooledConnection.handleException()


        DruidPooledConnection conn = (DruidPooledConnection) dataSource.getConnection();
        conn.close();

        SQLException error = new SQLException();
        try {
            conn.handleException(error);
        } catch (SQLException ex) {
            Assert.assertEquals(error, ex);
        }
    }
View Full Code Here


        conn.getConnection().close();

        {
            SQLException error = null;
            try {
                conn.handleException(new RuntimeException());
            } catch (SQLException ex) {
                error = ex;
            }
            Assert.assertNotNull(error);
        }
View Full Code Here

        conn.getConnection().close();

        {
            SQLException error = null;
            try {
                conn.handleException(new RuntimeException());
            } catch (SQLException ex) {
                error = ex;
            }
            Assert.assertNotNull(error);
        }
View Full Code Here

        conn.close();

        {
            SQLException error = null;
            try {
                conn.handleException(new RuntimeException());
            } catch (SQLException ex) {
                error = ex;
            }
            Assert.assertNotNull(error);
        }
View Full Code Here

        conn.close();

        Exception error = null;
        try {
            conn.handleException(new RuntimeException());
        } catch (SQLException e) {
            error = e;
        }
        Assert.assertNotNull(error);
       
View Full Code Here

    public void test_handleException_1() throws Exception {
        DruidPooledConnection conn = (DruidPooledConnection) dataSource.getConnection();

        Exception error = null;
        try {
            conn.handleException(new RuntimeException());
        } catch (SQLException e) {
            error = e;
        }
        Assert.assertNotNull(error);
View Full Code Here

        pstmt.setFetchSize(1000);

        SQLException exception = new SQLException("xx", "xxx", 28);
        boolean fatal = false;
        try {
            conn.handleException(exception);
        } catch (SQLException ex) {
            fatal = true;
        }
        Assert.assertTrue(fatal);
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.