抛出的异常是什么?如果抛出异常,那么我会假设 Session 对象的关键部分需要同步或更加小心地处理,可能不是整个会话。
我没有理由过多地使用它们,但我知道 wicket-ajax.js(在 org.apache.wicket.ajax 包中找到)中有频道。这些控制如何处理多个 AJAX 调用。他们可能值得一看。在这个文件中有以下注释:
/**
* Channel management
*
* Wicket Ajax requests are organized in channels. A channel maintain the order of
* requests and determines, what should happen when a request is fired while another
* one is being processed. The default behavior (stack) puts the all subsequent requests
* in a queue, while the drop behavior limits queue size to one, so only the most
* recent of subsequent requests is executed.
* The name of channel determines the policy. E.g. channel with name foochannel|s is
* a stack channel, while barchannel|d is a drop channel.
*
* The Channel class is supposed to be used through the ChannelManager.
*/