Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.weld.context.bound;
 
 import java.util.Map;
 
 
    // There is no need to store FQCN in a session key
    static final String NAMING_SCHEME_PREFIX = "WELD_BS";
    static final String KEY_BEAN_ID_INDEX_HASH =  + "_HASH";
    private final NamingScheme namingScheme;
    public BoundSessionContextImpl(String contextIdBeanIdentifierIndex index) {
        super(contextIdtrue);
    }
    public Class<? extends AnnotationgetScope() {
        return SessionScoped.class;
    }
    public boolean associate(Map<StringObjectstorage) {
        if (getBeanStore() == null) {
            setBeanStore(new SessionMapBeanStore(storage));
            checkBeanIdentifierIndexConsistency(storage);
            return true;
        } else {
            return false;
        }
    }
    private void checkBeanIdentifierIndexConsistency(Map<StringObjectstorage) {
        if (index != null && index.isBuilt()) {
            Object hash = storage.get();
            if (hash != null) {
                if (!index.getIndexHash().equals(hash)) {
                    throw ..beanIdentifierIndexInconsistencyDetected(hash.toString(), index.getDebugInfo());
                }
            } else {
                storage.put(index.getIndexHash());
            }
        }
    }
New to GrepCode? Check out our FAQ X