- public WebCmsSessionImpl(Subject initialSubject, Authorization authorization, String httpSessionId) {
- super(initialSubject, authorization, httpSessionId);
+ private HttpSession httpSession;
+
+ public WebCmsSessionImpl(Subject initialSubject, Authorization authorization, HttpServletRequest request) {
+ super(initialSubject, authorization, request.getSession(false).getId());
+ httpSession = request.getSession(false);
+ }
+
+ @Override
+ public boolean isValid() {
+ if (isClosed())
+ return false;
+ try {// test http session
+ httpSession.getCreationTime();
+ return true;
+ } catch (IllegalStateException ise) {
+ return false;
+ }