revision 11874 is too aggressive and can kill session prematurely.

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2979748
This commit is contained in:
Heng Sin Low 2010-04-01 21:41:34 +00:00
parent c7cb6449c4
commit ea22b39541
2 changed files with 9 additions and 5 deletions

View File

@ -75,6 +75,7 @@ public class DashboardRunnable implements Runnable, Serializable
{
// default Update every one minutes
int interval = MSysConfig.getIntValue(ZK_DASHBOARD_REFRESH_INTERVAL, 60000);
int cumulativeFailure = 0;
while(!stop) {
try {
Thread.sleep(interval);
@ -86,14 +87,17 @@ public class DashboardRunnable implements Runnable, Serializable
Locales.setThreadLocal(locale);
try {
refreshDashboard();
cumulativeFailure = 0;
} catch (DesktopUnavailableException de) {
killSession();
break;
cumulativeFailure++;
} catch (Exception e) {
logger.log(Level.INFO, e.getLocalizedMessage(), (e.getCause() != null ? e.getCause() : e));
break;
cumulativeFailure++;
}
if (cumulativeFailure > 3)
break;
} else {
logger.log(Level.INFO, "Desktop destroy, will kill session.");
killSession();
break;
}

View File

@ -46,8 +46,8 @@ public class ServerPushTemplate {
try {
if (!inUIThread) {
//half second timeout
if (Executions.activate(desktop, 500)) {
//10 minutes timeout
if (Executions.activate(desktop, 10 * 60 * 1000)) {
desktopActivated = true;
} else {
throw new DesktopUnavailableException("Timeout activating desktop.");