jmix-framework / jmix

Jmix framework
https://www.jmix.io
Apache License 2.0
505 stars 116 forks source link

Introduce application properties to define Push transport and mode #3004

Open glebfox opened 5 months ago

glebfox commented 5 months ago

In CUBA we have cuba.web.pushLongPolling that enables switching to long polling instead of WebSocket for server push implementation.

Currently, there is no alternative for Jmix and it's hard to change Push transport

glebfox commented 5 months ago

To change Push transport the custom AppUI class must be created. To do this:

  1. Create a custom AppUI class
@Push(transport = Transport.LONG_POLLING)
public class CustomAppUI extends AppUI {
}
  1. Register this bean

    @Bean
    public AppUI customAppUI() {
    return new CustomAppUI();
    }
  2. Exclude built-in AppUI class in application.properties:

jmix.core.exclude-beans = appUI