code: private void registerJsfCdiToSpring(BeanDefinition definition) {
  
  		if (definition instanceof AnnotatedBeanDefinition) {
  			AnnotatedBeanDefinition annDef = (AnnotatedBeanDefinition) definition;
  
  			String scopeName = null;
  			// firstly check whether bean is defined via configuration
  			if (annDef.getFactoryMethodMetadata() != null) {
  				scopeName = deduceScopeName(annDef.getFactoryMethodMetadata());
  			}
  			else {
  				// fallback to type
  				scopeName = deduceScopeName(annDef.getMetadata());
  			}
  
  			if (scopeName != null) {
  				definition.setScope(scopeName);
  
  				log.debug("{} - Scope({})", definition.getBeanClassName(), scopeName.toUpperCase());
  			}
  		}
  	}
docs: Checks how is bean defined and deduces scope name from JSF CDI annotations.
  
  @param definition beanDefinition