【问题标题】:transparent batching remote calls in dwrdwr 中的透明批处理远程调用
【发布时间】:2010-10-14 07:17:54
【问题描述】:

我希望 DWR 透明地批处理在处理同一事件过程中完成的所有远程调用。

原因是在 Javascript 中处理一个事件必须只需要很短的时间,并且在同一时间内不会发生任何其他事情。因此,如果我要进行很多调用,我想透明地对它们进行 DWR 批处理。那可能吗?怎么样?

【问题讨论】:

    标签: java ajax xmlhttprequest dwr


    【解决方案1】:

    DWR 的网站解释了Call Batching

    来自another DWR page

    远程调用可以一起批处理 以减少延迟。选项也可以 在 endBatch() 方法上设置:

    dwr.engine.beginBatch();
    Remote.methodInBatch1(params, callback1);
    Remote.methodInBatch2(params, callback2);
    dwr.engine.endBatch({
      timeout:3000
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多