} catch(ResourceException ex) { throw new FBSQLException(ex); }
    public synchronized void close() throws SQLException {        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.                                synchronized(mc) {                    if (!getAutoCommit() && localTransaction.inTransaction()) {                        //autocommit is always true for managed tx.                        try {                            txCoordinator.rollback();                        } finally {                            setAutoCommit(true);                        }                    }                    mc.close(this);                }                mc = null;            }        }    }