-
FEATURED COMPONENTS
First time here? Check out the FAQ!
![]() | 1 | initial version | |
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?
![]() | 2 | No.2 Revision |
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.
![]() | 3 | No.3 Revision |
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.