【发布时间】:2014-03-11 00:59:26
【问题描述】:
GWT 中的每个 RPC 都被限制为 1 分钟超时,这是不可配置的。
我正在使用来自调用 WEBSERVICE 的第三方提供商的 SYNC METHOD。
有时此方法(网络服务)会挂起超过 1 分钟,并使我的 RPC 崩溃。问题是我无法在服务器端捕获这个异常,我需要回滚一些标志(这是一个更复杂的过程,这只是一个例子)
try {
...my code goes here...
MYTHIRDPARTYWS ws = new MYTHIRDPARTYWS()
String RESULT = ws.run;
...my code needs to take action depending of the result...
} catch (Exception e) {
...my code needs to take action depending of the exception...
}
我需要这样的东西:
try {
...my code goes here...
Process p = new Process() {
MYTHIRDPARTYWS ws = new MYTHIRDPARTYWS()
String RESULT = ws.run;
};
p.setTimeOut(40000);
p.run;
...my code needs to take action depending of the result...
} catch (Exception e) {
...my code needs to take action depending of the exception...
}
有什么想法吗?
【问题讨论】:
标签: java web-services google-app-engine gwt gwt-rpc