public void sessionDestroyed() { CollectRecord activeRecord = getActiveRecord(); if (activeRecord != null) { try { releaseRecord(); } catch (RecordUnlockedException e) { } } }
public void invalidateSession() { try { releaseRecord(); } catch (RecordUnlockedException e) { // do nothing } GraniteContext graniteContext = GraniteContext.getCurrentInstance(); if (graniteContext != null && graniteContext instanceof HttpGraniteContext) { HttpGraniteContext httpGraniteContext = (HttpGraniteContext) graniteContext; HttpServletRequest request = httpGraniteContext.getRequest(); HttpSession session = request.getSession(); session.invalidate(); } }