IDEMPIERE-4072 iDempiere Monitor: Implement server and cache details for cluster node

This commit is contained in:
Carlos Ruiz 2019-10-22 17:06:17 +02:00
parent 34b0609f1a
commit f26db68e2b
2 changed files with 11 additions and 2 deletions

View File

@ -40,7 +40,7 @@ import org.compiere.model.I_AD_Message;
public final class Msg
{
/** Initial size of HashMap */
private static final int MAP_SIZE = 1500;
private static final int MAP_SIZE = 2000;
/** Separator between Msg and optional Tip */
private static final String SEPARATOR = Env.NL + Env.NL;

View File

@ -206,6 +206,15 @@ public final class AEnv
public static void logout()
{
String sessionID = Env.getContext(Env.getCtx(), "#AD_Session_ID");
synchronized (windowCache)
{
CCache<Integer,GridWindowVO> cache = windowCache.get(sessionID);
if (cache != null)
{
cache.clear();
CacheMgt.get().unregister(cache);
}
}
windowCache.remove(sessionID);
// End Session
MSession session = MSession.get(Env.getCtx(), false); // finish
@ -291,7 +300,7 @@ public final class AEnv
CCache<Integer,GridWindowVO> cache = windowCache.get(sessionID);
if (cache == null)
{
cache = new CCache<Integer, GridWindowVO>(I_AD_Window.Table_Name, I_AD_Window.Table_Name+"|GridWindowVO|Session", 10);
cache = new CCache<Integer, GridWindowVO>(I_AD_Window.Table_Name, I_AD_Window.Table_Name+"|GridWindowVO|Session|"+sessionID, 10);
windowCache.put(sessionID, cache);
}
cache.put(AD_Window_ID, mWindowVO);