// process annotated managed beans first as managed beans configured
// via config files take precedence
processAnnotations(ManagedBean.class);
BeanManager beanManager =
ApplicationAssociate.getInstance(sc).getBeanManager();
for (int i = 0; i < documentInfos.length; i++) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE,
MessageFormat.format(
"Processing managed-bean elements for document: ''{0}''",
documentInfos[i].getSourceURL()));
}
Document document = documentInfos[i].getDocument();
String namespace = document.getDocumentElement().getNamespaceURI();
NodeList managedBeans = document.getDocumentElement()
.getElementsByTagNameNS(namespace, MANAGED_BEAN);
if (managedBeans != null && managedBeans.getLength() > 0) {
for (int m = 0, size = managedBeans.getLength();
m < size;
m++) {
addManagedBean(beanManager,
managedBeans.item(m));
}
}
}
beanManager.preProcessesBeans();
invokeNext(sc, documentInfos);
}