{
return obj;
}
// ManagedBean
ManagedBean mbc = getRuntimeConfig(facesContext).getManagedBean(name);
if (mbc != null)
{
// check for cyclic references
List beansUnderConstruction = (List)requestMap.get(BEANS_UNDER_CONSTRUCTION);
if (beansUnderConstruction == null) {
beansUnderConstruction = new ArrayList();
requestMap.put(BEANS_UNDER_CONSTRUCTION, beansUnderConstruction);
}
String managedBeanName = mbc.getManagedBeanName();
if (beansUnderConstruction.contains(managedBeanName)) {
throw new FacesException( "Detected cyclic reference to managedBean " + mbc.getManagedBeanName());
}
beansUnderConstruction.add(managedBeanName);
try {
obj = beanBuilder.buildManagedBean(facesContext, mbc);
} finally {
beansUnderConstruction.remove(managedBeanName);
}
// put in scope
String scopeKey = mbc.getManagedBeanScope();
// find the scope handler object
Scope scope = (Scope) _scopes.get(scopeKey);
if (scope == null)
{