Revision history [back]

click to hide/show revision 1
initial version

asked 2022-07-18 20:18:51 +0800

nsaazn gravatar image nsaazn

ZK CE 9.6.0.1 SimpleDesktopCache

SimpleDesktopCache implementation uses shallExpunge from CacheMap, this method returns true only if GC was activated. This behaivor cause OutOfMemoryException. What best method i need to use to override this behaivor?

ZK CE 9.6.0.1 SimpleDesktopCache

SimpleDesktopCache implementation uses shallExpunge from CacheMap, this method returns true only if GC was activated. This behaivor cause OutOfMemoryException. OutOfMemoryException.

What best method i need to use to override this behaivor?

My solution: Implement Session listener and replace desktop cahce with my own implementation.

ZK CE 9.6.0.1 SimpleDesktopCacheSimpleDesktopCache.getDesktopIfAny condition raise

SimpleDesktopCache implementation uses shallExpunge from CacheMap, this method returns true only if GC was activated. This behaivor cause OutOfMemoryException.Method saves old value of AtomicBoolean outside of synchroization block:

What best method i need to use to override this behaivor?

public Desktop getDesktopIfAny(String desktopId) {
    final boolean old = _desktops.disableExpunge(true);
    try {
        synchronized (_desktops) {
            return _desktops.get(desktopId);
        }
    } finally {
        _desktops.disableExpunge(old);
    }
}

My solution: Implement Session listener This may cause condition raise and replace desktop cahce with my own implementation.old value become true. This will cause that dasktop cache never expunged.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More