@Override public void init(ServletConfig servletConfig) throws ServletException { super.init(servletConfig); getService().addSessionInitListener((SessionInitEvent event) -> { try { onVaadinSessionStarted(event.getRequest(), event.getSession()); } catch (ServletException e) { throw new ServiceException(e); } }); }
@Override public void init(PortletConfig portletConfig) throws PortletException { super.init(portletConfig); getService().addSessionInitListener((SessionInitEvent event) -> { try { onVaadinSessionStarted( (VaadinPortletRequest) event.getRequest(), (VaadinPortletSession) event.getSession()); } catch (PortletException e) { throw new ServiceException(e); } }); }