/** * Used to define a unit of work. All "units of work" should be surrounded by openSession and * closeSession calls. */ public static void closeSession() { log.trace("closing session"); clearUserContext(); // because we set a UserContext on the current // thread in openSession() getContextDAO().closeSession(); }
Context.clearUserContext();
realUserContext = null; } else { Context.clearUserContext();