Package org.apache.deltaspike.core.util.context

Examples of org.apache.deltaspike.core.util.context.ContextualStorage


    @Override
    protected ContextualStorage getContextualStorage(boolean createIfNotExists)
    {
        if (storage == null && createIfNotExists)
        {
            storage = new ContextualStorage(beanManager, concurrent, isPassivatingScope());
        }

        return storage;
    }
View Full Code Here


    @Override
    protected ContextualStorage getContextualStorage(boolean createIfNotExists)
    {
        Map<String, Object> viewMap = getViewMap();
        ContextualStorage storage = (ContextualStorage) viewMap.get(CONTEXTUAL_MAP_NAME);

        if (storage == null && createIfNotExists)
        {
            storage = new ContextualStorage(beanManager, false, isPassivatingScope());
            viewMap.put(CONTEXTUAL_MAP_NAME, storage);
        }

        return storage;
    }
View Full Code Here

        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
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.deltaspike.core.util.context.ContextualStorage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.