OK, this is what I did: I started the application in the eclipse debugger and just waited, did not touch the browser at all, no human actions. I just have a breakpoint in my UIInitListener:
public class WmsServiceInitListener implements VaadinServiceInitListener {
/**
*
*/
private static final long serialVersionUID = -1029506952956361276L;
private static final Logger LOGGER = Logger.getLogger(WmsServiceInitListener.class.getName());
@Override
public void serviceInit(ServiceInitEvent event) {
event.getSource().addUIInitListener(ue -> {
LOGGER.info(
"Starting new UI: WMS session/UI " + VaadinSession.getCurrent() + "/" + ue.getUI() );
});
event.getSource().addSessionDestroyListener(new WmsSessionDestroyListener());
event.getSource().addSessionInitListener(new WmsSessionInitListener());
}
}
I also have a breakpoint in sessionInit method of my WmsSessionInitListener. With or without @PreserveOnRefresh
enabled ( I never enabled it for Vaadin 7 because I did not need it ), I keep hitting my uiInitListener breakpoint. Note that I am doing nothing, at least not as a user. I am not currently using @PWA
, since I don’t need it yet and my MPR + Vaadin 7 app is not ready for it at all. Here is the logging ( I cut out some portions of lines, but left every line of logging to show timing of events ). Why is it initializing the UI even though I am doing nothing? You mention service workers, but to the best of my knowledge I don’t have one. How can I prove that true or false?
[INFO]
Started Jetty Server
19-09-10 17:13:00:489 WARN qtp1122084462-30 server.DefaultDeploymentConfiguration:242 -
====================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
====================================================================
Sep 10, 2019 5:13:19 PM com.mobiwms.website.WmsSessionInitListener sessionInit INFO: Initializing session com.vaadin.flow.server.VaadinSession@5ed864e4 with 0 UIs
Sep 10, 2019 5:13:25 PM com.mobiwms.website.WmsServiceInitListener lambda$0 INFO: Starting new UI: WMS session/UI com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@78fafb66
Sep 10, 2019 5:13:26 PM com.mobiwms.website.WmsEntryPoint <init> INFO: Starting WMS session/UI com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@78fafb66
Sep 10, 2019 5:13:26 PM com.mobiwms.website.WmsEntryPoint <init> INFO: Flow version '2.0.10', platform version '14.0.3', vaadin7 version '7.7.17', project version '3.8.Merge-vaadin14.0.3'
Sep 10, 2019 5:13:26 PM com.mobiwms.website.WmsEntryPoint <init> INFO: Browser/computer info: browser is Chrome, IP 0:0:0:0:0:0:0:1, OS Windows
Sep 10, 2019 5:13:26 PM com.mobiwms.website.WmsEntryPoint INFO: 4 servlet registrations.
Sep 10, 2019 5:13:26 PM com.wmsvision.util.ServletUtils logContextServlets INFO: Servlet name: default (org.eclipse.jetty.servlet.DefaultServlet); Mappings: /
Sep 10, 2019 5:13:26 PM com.wmsvision.util.ServletUtils logContextServlets INFO: Servlet name: jsp (org.eclipse.jetty.jsp.JettyJspServlet); Mappings: *.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP
Sep 10, 2019 5:13:26 PM com.wmsvision.util.ServletUtils logContextServlets INFO: Servlet name: com.vaadin.mpr.MprServlet; Mappings: /framework/*
Sep 10, 2019 5:13:26 PM com.wmsvision.util.ServletUtils logContextServlets INFO: Servlet name: com.vaadin.flow.server.startup.ServletDeployer (com.vaadin.flow.server.VaadinServlet); Mappings: /*
Sep 10, 2019 5:13:26 PM com.mobiwms.website.component.HelpVideoWindow <init> INFO: Title: Login; ...
Sep 10, 2019 5:13:26 PM com.mobiwms.website.component.HelpVideoWindow getWmsHelpVideo INFO: Title: Login; Video name: null
Sep 10, 2019 5:13:26 PM com.mobiwms.website.component.HelpVideoWindow getWmsHelpVideoByTitle INFO: Title: Login; videoDirectory: null
Sep 10, 2019 5:13:26 PM com.mobiwms.website.component.HelpVideoWindow getWmsHelpVideoByTitle INFO: Title: Login; videoDirectory: null
Sep 10, 2019 5:13:26 PM com.mobiwms.website.domain.MessageMgmtService getInstance WARNING: No MessageMgmtService in WmsUI data provider, so trying session
Sep 10, 2019 5:13:26 PM com.mobiwms.website.view.login.LoginView <init> INFO: Got message mgmt service for holiday footer.
Sep 10, 2019 5:13:26 PM com.mobiwms.website.domain.LoginService getInstance WARNING: com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@78fafb66: No LoginService in WmsEntryPoint data provider, so trying session
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getClientSocket INFO: Get socket for client: mobiwms
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getWmsConfPath INFO: Path 1 ...
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getWmsConfPath INFO: Path 2 ...
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getWmsConfPath INFO: Path 3 ...
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getWmsConfPath INFO: Getting configuration from ...
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getClientSocket INFO: Name 'socket.xml';Path '...'
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getClientSocket SEVERE: Configuration file (socket.xml) missing.
Sep 10, 2019 5:13:26 PM com.wmsvision.web.WebClientSocket getInstance WARNING: Ignored WebClientSock exception java.io.FileNotFoundException: D:\...\vaadinwebsite\src\conf\wms\socket.xml (The system cannot find the path specified): D:\...\vaadinwebsite\src\conf\wms\socket.xml (The system cannot find the path specified)
Sep 10, 2019 5:13:26 PM com.mobiwms.website.domain.LoginService getInstance INFO: com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@78fafb66: Getting new login service, created at Tue Sep 10 17:13:26 EDT 2019
Sep 10, 2019 5:13:26 PM com.mobiwms.website.data.WmsDataProvider setLoginService INFO: com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@78fafb66: Setting login service to com.mobiwms.website.domain.LoginService@50304d18
Sep 10, 2019 5:13:26 PM com.mobiwms.website.domain.LoginService getInstanceClient SEVERE: No client for login session created at Tue Sep 10 17:13:26 EDT 2019, so get a new client, forcing a refresh
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getClientSocket INFO: Get socket for client: mobiwms
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getClientSocket INFO: Name 'socket.xml';Path '...'
Sep 10, 2019 5:13:26 PM com.wmsvision.web.util.WebConfig getClientSocket SEVERE: Configuration file (socket.xml) missing.
Sep 10, 2019 5:13:26 PM com.wmsvision.web.WebClientSocket getInstance WARNING: Ignored WebClientSock exception java.io.FileNotFoundException: D:\...\vaadinwebsite\src\conf\wms\socket.xml (The system cannot find the path specified): D:\...\vaadinwebsite\src\conf\wms\socket.xml (The system cannot find the path specified)
Sep 10, 2019 5:13:26 PM com.mobiwms.website.domain.LoginService getInstanceClient INFO: Got login service, created at Tue Sep 10 17:13:26 EDT 2019, with no client
Sep 10, 2019 5:13:26 PM com.mobiwms.website.view.login.LoginView <init> SEVERE: Backend seems to be down: Test webClient down
Sep 10, 2019 5:13:31 PM com.mobiwms.website.WmsServiceInitListener lambda$0 INFO: Starting new UI: WMS session/UI com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@6d92f062
Sep 10, 2019 5:15:15 PM com.mobiwms.website.WmsServiceInitListener lambda$0 INFO: Starting new UI: WMS session/UI com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@539b01ac
Sep 10, 2019 5:18:43 PM com.mobiwms.website.WmsServiceInitListener lambda$0 INFO: Starting new UI: WMS session/UI com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@271e8d0b
Sep 10, 2019 5:20:20 PM com.mobiwms.website.WmsServiceInitListener lambda$0 INFO: Starting new UI: WMS session/UI com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@13651aa0
Sep 10, 2019 5:23:51 PM com.mobiwms.website.WmsServiceInitListener lambda$0 INFO: Starting new UI: WMS session/UI com.vaadin.flow.server.VaadinSession@5ed864e4/com.vaadin.flow.component.UI@690376f3