On the problem of pushing technology of DWR

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.