[ 1717125 ] Frequently checking for new Requests/Notices

- Implemented sysconfig parameter MENU_INFOUPDATER_SLEEP_MS to allow parameterization of the wait seconds.
- Implemented also in MSysConfig the cache of not found keys.
This commit is contained in:
Carlos Ruiz 2008-03-06 04:25:16 +00:00
parent 42df020713
commit 19e200089d
2 changed files with 7 additions and 1 deletions

View File

@ -263,6 +263,9 @@ public class MSysConfig extends X_AD_SysConfig
String str = s_cache.get(key);
if (str != null)
return str;
if (str == null && s_cache.containsKey(key)) // found null key
return defaultValue;
//
String sql = "SELECT Value FROM AD_SysConfig"
+ " WHERE Name=? AND AD_Client_ID IN (0, ?) AND AD_Org_ID IN (0, ?) AND IsActive='Y'"
@ -295,6 +298,8 @@ public class MSysConfig extends X_AD_SysConfig
return str;
}
else {
// anyways, put the not found key as null
s_cache.put(key, null);
return defaultValue;
}
}

View File

@ -57,6 +57,7 @@ import org.compiere.apps.wf.WFPanel;
import org.compiere.grid.tree.VTreePanel;
import org.compiere.model.MRole;
import org.compiere.model.MSession;
import org.compiere.model.MSysConfig;
import org.compiere.model.MSystem;
import org.compiere.model.MTreeNode;
import org.compiere.model.MUser;
@ -774,7 +775,7 @@ public final class AMenu extends CFrame
updateInfo();
try {
Thread.sleep(60000);
Thread.sleep(MSysConfig.getIntValue("MENU_INFOUPDATER_SLEEP_MS", 60000, Env.getAD_Client_ID(Env.getCtx())));
} catch(InterruptedException ire) { }
}
}