if (isClosed()) { throw new SQLException("You cannot setAutocommit on a closed connection."); }
checkValidity();
    public synchronized void setAutoCommit(boolean autoCommit)         throws SQLException     {        if (isClosed())        {            throw new SQLException("You cannot setAutocommit on a closed connection.");        }        if (mc.autoCommit != autoCommit)        {            try {                if (inTransaction())                {                    getLocalTransaction().commit();                }                this.mc.autoCommit = autoCommit;                if (!autoCommit)                 {                    getLocalTransaction().begin();                } // end of if ()            } catch(javax.resource.ResourceException resex) {                throw new SQLException(resex.toString());            }        } // end of if ()            }