Package com.alibaba.druid.pool

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


        conn.getClientInfo();

        conn.createArrayOf("int", new Object[0]);
        conn.createStruct("int", new Object[0]);

        conn.addConnectionEventListener(null);
        conn.removeConnectionEventListener(null);
        conn.addStatementEventListener(null);
        conn.removeStatementEventListener(null);

        conn.close();
View Full Code Here


        conn.close();
        {
            Exception error = null;
            try {
                conn.addConnectionEventListener(null);
            } catch (IllegalStateException ex) {
                error = ex;
            }
            Assert.assertNotNull(error);
        }
View Full Code Here

        Assert.assertEquals(true, conn.isClosed());
    }

    public void test_handleException_5() throws Exception {
        DruidPooledConnection conn = dataSource.getConnection().unwrap(DruidPooledConnection.class);
        conn.addConnectionEventListener(new ConnectionEventListener() {

            @Override
            public void connectionClosed(ConnectionEvent event) {

            }
View Full Code Here

    public void test_event_error() throws Exception {
        DruidPooledConnection conn = (DruidPooledConnection) dataSource.getPooledConnection();

        final AtomicInteger errorCount = new AtomicInteger();
        conn.addConnectionEventListener(new ConnectionEventListener() {

            @Override
            public void connectionErrorOccurred(ConnectionEvent event) {
                errorCount.incrementAndGet();
            }
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.