* @see ConfigProcessor#process(org.w3c.dom.Document[])
*/
public void process(Document[] documents)
throws Exception {
BeanManager beanManager = null;
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) {
beanManager =
ApplicationAssociate.getCurrentInstance().getBeanManager();
for (int m = 0, size = managedBeans.getLength();
m < size;
m++) {
addManagedBean(beanManager,
managedBeans.item(m));
}
}
}
if (beanManager != null) {
beanManager.preProcessesBeans();
}
invokeNext(documents);
}