// process annotated managed beans first as managed beans configured
// via config files take precedence
processAnnotations(ManagedBean.class);
BeanManager beanManager =
ApplicationAssociate.getCurrentInstance().getBeanManager();
for (int i = 0; i < documents.length; i++) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE,
MessageFormat.format(
"Processing managed-bean elements for document: ''{0}''",
documents[i].getDocumentURI()));
}
String namespace = documents[i].getDocumentElement()
.getNamespaceURI();
NodeList managedBeans = documents[i].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(documents);
}