I probably looked at Dwr's push mechanism, and my understanding is:
Server state saved in Scriptsession
The engine on the client page sends the request to the Web server periodically, see scriptsession, if found not to be empty, then send the JS call saved in Scriptsession to the client page, otherwise the thread waits for a certain time, but scriptsession is obtained by DWR the internal context object, which means that it cannot be changed beyond the DWR frame scriptsession
My problem is that if the mechanism outside the DWR control causes the server data to change, such as: The database is changed by the external system, this change how to push to the client.
The problem is progressing.
The context can still be within the scope of the container
Because
ServerContext sctx = Servercontextfactory.get (Config.getservletcontext ());
So in any place where you can access ServletContext, you can push data to the client via DWR.