Package com.alibaba.druid.mock

Examples of com.alibaba.druid.mock.MockConnectionClosedException


        if (closed) {
            throw new SQLException();
        }
       
        if (this.connection != null && this.connection.isClosed()) {
            throw new MockConnectionClosedException();
        }
    }
View Full Code Here


        if (this.connection != null) {
            if (this.connection instanceof MockConnection) {
                ((MockConnection) this.connection).checkState();
            } else if (this.connection.isClosed()) {
                throw new MockConnectionClosedException();
            }
        }
    }
View Full Code Here

        return null;
    }

    public PreparedStatement prepareStatement(String sql) throws SQLException {
        if (isClosed()) {
            throw new MockConnectionClosedException();
        }

        return this.getDriver().createMockPreparedStatement(this, sql);
    }
View Full Code Here

            stmt.setString(1, "xx");

            MockConnection mockConn = conn.unwrap(MockConnection.class);
            mockConn.close();

            MockConnectionClosedException error = null;
            try {
                stmt.execute();
            } catch (MockConnectionClosedException ex) {
                error = ex;
            }
View Full Code Here

        if (closed) {
            throw new SQLException();
        }
       
        if (this.connection != null && this.connection.isClosed()) {
            throw new MockConnectionClosedException();
        }
    }
View Full Code Here

        if (closed) {
            throw new SQLException();
        }
       
        if (this.connection != null && this.connection.isClosed()) {
            throw new MockConnectionClosedException();
        }
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.mock.MockConnectionClosedException

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.