Greetings all,
Can someone please point out how to implement this in Cuba 7.2?
Thanks,
Kyle.
Greetings all,
Can someone please point out how to implement this in Cuba 7.2?
Thanks,
Kyle.
Hello!
CubaVaadinServletService
and set systemMessageProvider
in the constructor:public class MyCubaVaadinServletService extends CubaVaadinServletService {
public MyCubaVaadinServletService(VaadinServlet servlet, DeploymentConfiguration deploymentConfiguration) throws ServiceException {
super(servlet, deploymentConfiguration);
setSystemMessagesProvider(systemMessagesInfo -> {
/* copied code from super class */
CustomizedSystemMessages msgs = new CustomizedSystemMessages();
// disable notification
msgs.setSessionExpiredNotificationEnabled(false);
/* copied code from super class */
});
}
}
CubaApplicationServlet
to create MyCubaVaadinServletService
:public class MyCubaApplicationServlet extends CubaApplicationServlet {
@Override
protected VaadinServletService createServletService(DeploymentConfiguration deploymentConfiguration) throws ServiceException {
CubaVaadinServletService service = new MyCubaVaadinServletService(this, deploymentConfiguration);
if (classLoader != null) {
service.setClassLoader(classLoader);
}
service.init();
return service;
}
}
app_servlet
replace servlet class by your implementation:<servlet>
<servlet-name>app_servlet</servlet-name>
<servlet-class>com.company.fssystemmessage.web.MyCubaApplicationServlet</servlet-class>
See the demo project: fs-systemmessage.zip (84.3 KB)
In the project, I also changed the session expiration time to 10 seconds and disabled heartbeat requests for the test purpose.
This solves my problem.
Many thanks Mr. Pinyazhin.