One option for implementing WebSocket or Comet solutions is by using the dojox/socket
module.
Another approach is to utilize the CometD project, which supports long polling and facilitates communication between Java applications (through the CometD Java library) and JavaScript applications (through the Comet Dojo library).
Please note that while CometD is not integrated into Dojo out of the box, it is a standalone project (although the JavaScript library was included in previous versions).
Implementing this solution will require changes to your code setup. Initially, you must run the CometD Java service, after which you can utilize either ServerSession
to publish data or ClientSession
to subscribe on the Java side. To delve deeper into implementation details, we recommend consulting the reference guide.