Package javax.sql

Examples of javax.sql.StatementEvent


     */
    public void testStatementEventPooledConnectionPreparedStatement() {
        assertNotNull(st);

        try {
            new StatementEvent(null, null);
            fail("should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // expected
        }
    }
View Full Code Here


    /**
     * @tests serialization/deserialization compatibility with RI.
     */
    public void testSerializationCompatibility() throws Exception {
        StatementEvent st3 = new StatementEvent(pc, null, new SQLException(
                "test message"));
        SerializationTest.verifyGolden(this, st3, STATEMENTEVENT_COMPARATOR);
    }
View Full Code Here

    try {
      super.close();
    } finally {
      try {
        StatementEvent e = new StatementEvent(con, this);
        // todo: pull this all up into base classes when we support *only* JDK6 or newer
        if (con instanceof JDBC4MysqlPooledConnection) {
          ((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
        } else if (con instanceof JDBC4MysqlXAConnection) {
          ((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
View Full Code Here

    }

    void fireStatementClosed(final PreparedStatement pstmt) {
        if (this.getAtomicStatementEventListenerList().get() != null) {
            for (final StatementEventListener listener : this.getStatementEventListenerList())
                listener.statementClosed(new StatementEvent(this, pstmt));
        }
    }
View Full Code Here

    try {
      super.close();
    } finally {
      try {
        StatementEvent e = new StatementEvent(con, this);
        // todo: pull this all up into base classes when we support *only* JDK6 or newer
        if (con instanceof JDBC4MysqlPooledConnection) {
          ((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
        } else if (con instanceof JDBC4MysqlXAConnection) {
          ((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
View Full Code Here

TOP

Related Classes of javax.sql.StatementEvent

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.