Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rename macro 'p' to 'mgnl-p'.

...

  • Disable session persistence in Tomcat 
    Jira
    serverMagnolia - Issue tracker
    serverId500b06a6-e204-3125-b989-2d75b973d05f
    keyMGNLCE-46
  • Investigate other containers 
    Jira
    serverMagnolia - Issue tracker
    serverId500b06a6-e204-3125-b989-2d75b973d05f
    keyDOCU-751
  • make vaadin-session transient in http-session
    • no dice: I tried to wrap VaadinSession (see code below) and make it transient but this fails with 

      Code Block
      titleClassCastEx
      collapsetrue
      ERROR magnolia.ui.admincentral.AdmincentralVaadinServlet: An internal error has occurred in the VaadinServlet.
      javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.ClassCastException: info.magnolia.ui.admincentral.AdmincentralSessionListener$VaadinSessionWrapper cannot be cast to com.vaadin.server.VaadinSession
      	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:352)
      	at info.magnolia.ui.admincentral.AdmincentralVaadinServlet.service(AdmincentralVaadinServlet.java:131)
      Code Block
      languagejava
      titleVaadinSession transient in HttpSession
      collapsetrue
      public class AdmincentralSessionFilter extends AbstractMgnlFilter {
      
          private static final Logger log = LoggerFactory.getLogger("info.magnolia.debug");
          private boolean isWrapped = false;
      
          @Override
          public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {
      
              if (!isWrapped) {
                  // wrap com.vaadin.server.VaadinSession.AdminCentral
                  Object session = request.getSession().getAttribute("com.vaadin.server.VaadinSession.AdminCentral");
                  if (session != null && session instanceof VaadinSession) {
                      VaadinSessionWrapper wrapper = new VaadinSessionWrapper((VaadinSession) session);
                      request.getSession().setAttribute("com.vaadin.server.VaadinSession.AdminCentral", wrapper);
                      isWrapped = true;
                  } else {
                      log.error("Somesing wong!");
                  }
              }
              chain.doFilter(request, response);
          }
      
          private static final class VaadinSessionWrapper implements HttpSessionBindingListener, Serializable {
      
              private transient VaadinSession vaadinSession;
      
              public VaadinSessionWrapper(final VaadinSession session) {
                  this.vaadinSession = session;
              }
      		// bunch of delegate methods omitted
          }
      }
      

...