viewAccessBeanAccessHistory.getAccessedBeans().clear();
}
private void destroyExpiredBeans()
{
ContextualStorage storage = viewAccessBeanHolder.getContextualStorage(beanManager, KEY, false);
if (storage != null)
{
for (Map.Entry<Object, ContextualInstanceInfo<?>> storageEntry : storage.getStorage().entrySet())
{
if (!viewAccessBeanAccessHistory.getAccessedBeans().contains((String) storageEntry.getKey()))
{
Contextual bean = storage.getBean(storageEntry.getKey());
AbstractContext.destroyBean(bean, storageEntry.getValue());
storage.getStorage().remove(storageEntry.getKey()); //ok due to ConcurrentHashMap
}
}
}
}