Hide
I'm trying to use regular polling instead of comet in RC3. What happens though is the client goes nuts and polls the server constantly (about once every 50ms-100ms which I assume is immediate).
The change I made to move to polling was to add the following to the web.xml, as the documentation suggests:
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>crossDomainSessionSecurity</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>scriptSessionTimeout</param-name>
<param-value>1800000</param-value>
</init-param>
<init-param>
<param-name>activeReverseAjaxEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name>
<param-value>org.directwebremoting.impl.PollingServerLoadMonitor</param-value>
</init-param>
<init-param>
<param-name>timeToNextPoll</param-name>
<param-value>5000</param-value>
</init-param>
<init-param>
<param-name>normalizeIncludesQueryString</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
then in JS when the page is loaded:
dwr.engine.setActiveReverseAjax(true);
If i remove the PollingServletLoadMonitor, it uses the Comet method (even though has delays on notification).
I noticed that the timeToNextPoll is basically ignored in the PollHandler close stream because of the browser partial flag (both explorer and firefox).
Show
I'm trying to use regular polling instead of comet in RC3. What happens though is the client goes nuts and polls the server constantly (about once every 50ms-100ms which I assume is immediate).
The change I made to move to polling was to add the following to the web.xml, as the documentation suggests:
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>crossDomainSessionSecurity</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>scriptSessionTimeout</param-name>
<param-value>1800000</param-value>
</init-param>
<init-param>
<param-name>activeReverseAjaxEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name>
<param-value>org.directwebremoting.impl.PollingServerLoadMonitor</param-value>
</init-param>
<init-param>
<param-name>timeToNextPoll</param-name>
<param-value>5000</param-value>
</init-param>
<init-param>
<param-name>normalizeIncludesQueryString</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
then in JS when the page is loaded:
dwr.engine.setActiveReverseAjax(true);
If i remove the PollingServletLoadMonitor, it uses the Comet method (even though has delays on notification).
I noticed that the timeToNextPoll is basically ignored in the PollHandler close stream because of the browser partial flag (both explorer and firefox).