@@ -0,0 +1,3261 @@
+//%0A// Copyright described at LICENSE.txt%0A//%0Apackage org.persapiens.jsfboot;%0A%0Aimport java.util.Set;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;%0Aimport org.springframework.beans.factory.config.BeanDefinition;%0Aimport org.springframework.context.annotation.AnnotationScopeMetadataResolver;%0Aimport org.springframework.context.annotation.ScopeMetadata;%0A%0A/**%0A * Spring Metadata Resolver to support cdi and jsf annotations%0A */%0Apublic class CdiScopeResolver%0A    extends AnnotationScopeMetadataResolver%0A%7B%0A    private static final Logger logger = LoggerFactory%0A%09%09%09.getLogger(CdiScopeResolver.class);%0A    %0A    public String scopeName( Set%3CString%3E annotationTypes )%0A    %7B%0A        String result = null;%0A        if ( annotationTypes.contains(%0A            javax.enterprise.context.RequestScoped.class.getName() )%0A            %7C%7C annotationTypes.contains(%0A            javax.faces.bean.RequestScoped.class.getName() ) )%0A        %7B%0A            result = %22request%22;%0A        %7D%0A        else if ( annotationTypes.contains(%0A            javax.enterprise.context.SessionScoped.class.getName() )%0A            %7C%7C annotationTypes.contains(%0A            javax.faces.bean.SessionScoped.class.getName() ) )%0A        %7B%0A            result = %22session%22;%0A        %7D%0A        else if ( annotationTypes.contains(%0A            javax.enterprise.context.ApplicationScoped.class.getName() )%0A            %7C%7C annotationTypes.contains(%0A            javax.faces.bean.ApplicationScoped.class.getName() ) )%0A        %7B%0A            result = %22singleton%22;%0A        %7D%0A        else if ( annotationTypes.contains(%0A            javax.faces.bean.NoneScoped.class.getName() ) )%0A        %7B%0A            result = %22prototype%22;%0A        %7D%0A        else if ( annotationTypes.contains(%0A            javax.faces.view.ViewScoped.class.getName() )%0A            %7C%7C annotationTypes.contains(%0A            javax.faces.bean.ViewScoped.class.getName() ))%0A        %7B%0A            result = %22view%22;%0A        %7D%0A        else if ( annotationTypes.contains(%0A            javax.enterprise.context.ConversationScoped.class.getName() ) )%0A        %7B%0A            result = %22session%22;%0A        %7D%0A        return result;%0A    %7D%0A    %0A    /**%0A     * Discover spring scope using bean definition%0A     * @param definition bean definition%0A     * @return scope metadata%0A     */%0A    @Override%0A    public ScopeMetadata resolveScopeMetadata( BeanDefinition definition )%0A    %7B%0A        ScopeMetadata metadata = new ScopeMetadata();%0A        if ( definition instanceof AnnotatedBeanDefinition )%0A        %7B%0A            AnnotatedBeanDefinition annDef = ( AnnotatedBeanDefinition ) definition;%0A%0A            String scopeName = scopeName(annDef.getMetadata().getAnnotationTypes());%0A            if ( scopeName != null )%0A            %7B%0A                metadata.setScopeName( scopeName );%0A            %7D%0A            else%0A            %7B%0A                // do the regular Spring stuff..%0A                metadata = super.resolveScopeMetadata( definition );%0A            %7D%0A        %7D%0A%0A        logger.debug( definition.getBeanClassName()%0A            + %22 - %22 + metadata.getScopeName().toUpperCase() %0A            + %22 - %22 + metadata.getScopedProxyMode().toString().toUpperCase());%0A        %0A        return metadata;%0A    %7D%0A%7D%0A

fix #8