src/org/nutz/trans/Trans.java
public static void closeConnectionAuto(Connection conn) {
        if (get() == null && null != conn) {
            try {
                conn.close();
            }
            catch (SQLException e) {
                throw Lang.wrapThrow(e);
            }
        }
    }
public static void closeConnectionAuto(Connection conn) {
        if (get() == null && null != conn) {
            try {
                conn.close();
            }
            catch (SQLException e) {
                throw Lang.wrapThrow(e);
            }
        }
    }
自动判断是否关闭当前连接
@param conn 数据库连接