/** * @see Connection#setSavepoint() */ public java.sql.Savepoint setSavepoint() throws SQLException { checkClosed(); if (isInGlobalTx()) { throw SQLError.createSQLException("Can't set autocommit to 'true' on an XAConnection", SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION, MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor); } try { return this.mc.setSavepoint(); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } return null; // we don't reach this code, compiler can't tell }
/** * @see Connection#setSavepoint(String) */ public java.sql.Savepoint setSavepoint(String arg0) throws SQLException { checkClosed(); if (isInGlobalTx()) { throw SQLError.createSQLException("Can't set autocommit to 'true' on an XAConnection", SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION, MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor); } try { return this.mc.setSavepoint(arg0); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } return null; // we don't reach this code, compiler can't tell }
/** * Passes call to method on physical connection instance. Notifies listeners * of any caught exceptions before re-throwing to client. * * @see java.sql.Connection#setAutoCommit */ public void setAutoCommit(boolean autoCommit) throws SQLException { checkClosed(); if (autoCommit && isInGlobalTx()) { throw SQLError.createSQLException( "Can't set autocommit to 'true' on an XAConnection", SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION, MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor); } try { this.mc.setAutoCommit(autoCommit); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } }
/** * @see Connection#setSavepoint() */ public java.sql.Savepoint setSavepoint() throws SQLException { checkClosed(); if (isInGlobalTx()) { throw SQLError.createSQLException( "Can't set autocommit to 'true' on an XAConnection", SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION, MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor); } try { return this.mc.setSavepoint(); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } return null; // we don't reach this code, compiler can't tell }
/** * @see Connection#setSavepoint(String) */ public java.sql.Savepoint setSavepoint(String arg0) throws SQLException { checkClosed(); if (isInGlobalTx()) { throw SQLError.createSQLException( "Can't set autocommit to 'true' on an XAConnection", SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION, MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor); } try { return this.mc.setSavepoint(arg0); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } return null; // we don't reach this code, compiler can't tell }
/** * Passes call to method on physical connection instance. Notifies listeners * of any caught exceptions before re-throwing to client. * * @throws SQLException * if an error occurs */ public void commit() throws SQLException { checkClosed(); if (isInGlobalTx()) { throw SQLError .createSQLException( "Can't call commit() on an XAConnection associated with a global transaction", SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION, MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor); } try { this.mc.commit(); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } }
/** * Passes call to method on physical connection instance. Notifies listeners * of any caught exceptions before re-throwing to client. * * @see java.sql.Connection#rollback() */ public void rollback() throws SQLException { checkClosed(); if (isInGlobalTx()) { throw SQLError .createSQLException( "Can't call rollback() on an XAConnection associated with a global transaction", SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION, MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor); } try { this.mc.rollback(); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } }
/** * @see Connection#rollback(Savepoint) */ public void rollback(Savepoint arg0) throws SQLException { checkClosed(); if (isInGlobalTx()) { throw SQLError .createSQLException( "Can't call rollback() on an XAConnection associated with a global transaction", SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION, MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor); } try { this.mc.rollback(arg0); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } }