在DWR應(yīng)用中.默認(rèn)啟用的是Full Streaming Mode .它是三種modes中最快的一種.它每60秒檢查一次瀏覽器是否是活躍的.配置很簡(jiǎn)單:
















Early Closing Mode:
在2.0.4以后的版本中不需要添加配置..而2.0.3以前的版本需要、添加




If it is deemed unwise to hold connections open at all then DWR can use polling mode




In polling mode the default poll rate is every 5 seconds. This can be customized using the following:
<init-param>
<param-name>disconnectedTime</param-name>
<param-value>60000</param-value>
</init-param>
The example above will poll only once every 60 seconds (60,000 milliseconds). For many applications a response time of 60 seconds will be enough, and will allow a web server to handle a very large number of clients.
測(cè)試環(huán)境:IE8.0,Firefox 2.0,Windows xp sp2,Tomcat 6.0,MsSQL Server 2000
使用技術(shù):Spring,Hibernate.Ext.DWR
用第一種配置的時(shí)候IE運(yùn)行不了.報(bào)異常 "要完成操作的數(shù)據(jù)尚未準(zhǔn)備好",Firefox可以.
第二種配置在maxWaitForWrite少于200的情況下IE運(yùn)行正常,Firefox運(yùn)行正常.
第三種配置只能打開一個(gè)連接.再想打開第二個(gè)則會(huì)報(bào) java.lang.IllegaStateException:Cannot create a session after response has been commited
很是郁悶...若將maxWaitForWrite設(shè)置為100.則兩個(gè)瀏覽器均沒問題..但是瀏覽器久無刷新動(dòng)作就無法從服務(wù)器調(diào)用客戶端
這篇文章望拋磚引玉..各位講下你們是如何配置的