try { freeStatements(); } finally {  if (mc != null) {       if (!getAutoCommit() && localTransaction.inTransaction()) {  try { txCoordinator.rollback(); } finally { setAutoCommit(true);
try { freeStatements(); } finally {  if (mc != null) {       if (!getAutoCommit() && localTransaction.inTransaction()) {  try { txCoordinator.rollback(); } finally { setAutoCommit(true); }
    public synchronized void close() throws SQLException {        try {        try {            freeStatements();        } finally {                        if (mc != null) {                //if we are in a transaction started                 //automatically because autocommit = false, roll it back.                                //leave managed transactions alone, they are normally                //committed after the Connection handle is closed.                                if (!getAutoCommit() && localTransaction.inTransaction()) {                    //autocommit is always true for managed tx.                    try {                        txCoordinator.rollback();                    } finally {                        setAutoCommit(true);                    }                }                mc.close(this);                mc = null;            }        }        } catch(ResourceException ex) {            throw new FBSQLException(ex);        }    }