I wanted to replace Tomcat in Vaadin. Wanted to replace it with Under / Jetty / Netty. Currently I am using spring boot and replaced tomcat with undertow. Unfortunatelty this setup disables WEB_PUSH in Vaadin. Is there any way around this ? or maybe a way to replace tomcat inside vaadin ? or to make vaadin webpush to work with undertow / netty / jetty ? I really need something more lightweight. Tomcat is very heavy.
If I replace tomcat with undertow, this error occurs:
java.lang.IllegalStateException: Unable to configure jsr356 at that stage. ServerContainer is null
at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:58) ~[atmosphere-runtime-3.0.3.slf4jvaadin1.jar:3.0.3.slf4jvaadin1]
at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:47) ~[atmosphere-runtime-3.0.3.slf4jvaadin1.jar:3.0.3.slf4jvaadin1]
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483) ~[na:na]
at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:126) ~[atmosphere-runtime-3.0.3.slf4jvaadin1.jar:3.0.3.slf4jvaadin1]
at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:197) ~[atmosphere-runtime-3.0.3.slf4jvaadin1.jar:3.0.3.slf4jvaadin1]
at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:183) ~[atmosphere-runtime-3.0.3.slf4jvaadin1.jar:3.0.3.slf4jvaadin1]
at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:2078) ~[atmosphere-runtime-3.0.3.slf4jvaadin1.jar:3.0.3.slf4jvaadin1]
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:908) ~[atmosphere-runtime-3.0.3.slf4jvaadin1.jar:3.0.3.slf4jvaadin1]
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:832) ~[atmosphere-runtime-3.0.3.slf4jvaadin1.jar:3.0.3.slf4jvaadin1]
at com.vaadin.flow.server.communication.PushRequestHandler.initAtmosphere(PushRequestHandler.java:263) ~[flow-server-24.1.5.jar:24.1.5]
at com.vaadin.flow.server.communication.PushRequestHandler.<init>(PushRequestHandler.java:98) ~[flow-server-24.1.5.jar:24.1.5]
at com.vaadin.flow.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:105) ~[flow-server-24.1.5.jar:24.1.5]
at com.vaadin.flow.server.VaadinService.init(VaadinService.java:229) ~[flow-server-24.1.5.jar:24.1.5]
at com.vaadin.flow.spring.SpringVaadinServletService.init(SpringVaadinServletService.java:101) ~[vaadin-spring-24.1.5.jar:na]
at com.vaadin.flow.spring.SpringServlet.createServletService(SpringServlet.java:115) ~[vaadin-spring-24.1.5.jar:na]
at com.vaadin.flow.server.VaadinServlet.createServletService(VaadinServlet.java:336) ~[flow-server-24.1.5.jar:24.1.5]
at com.vaadin.flow.server.VaadinServlet.init(VaadinServlet.java:132) ~[flow-server-24.1.5.jar:24.1.5]
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:944) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedContext.load(TomcatEmbeddedContext.java:84) ~[spring-boot-3.1.2.jar:3.1.2]
This indicates that
@Push(PushMode.AUTOMATIC,transport = Transport.WEBPUSH)
wont work. I want this to work with undertow