You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by ge...@apache.org on 2008/11/23 19:32:54 UTC
svn commit: r720025 -
/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
Author: gerdogdu
Date: Sun Nov 23 10:32:54 2008
New Revision: 720025
URL: http://svn.apache.org/viewvc?rev=720025&view=rev
Log:
Seperate methods into two part.
Modified:
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java?rev=720025&r1=720024&r2=720025&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java Sun Nov 23 10:32:54 2008
@@ -113,6 +113,7 @@
private static void configure(Element webBeansRoot)
{
+ List<Element> webBeanDeclerationList = new ArrayList<Element>();
List<Element> childs = webBeansRoot.elements();
Iterator<Element> it = childs.iterator();
@@ -123,13 +124,7 @@
if (XMLUtil.isElementWebBeanDeclaration(child))
{
- if (XMLUtil.isElementJMSDeclaration(child))
- {
- configureJMSEndpointComponent(child);
- } else
- {
- configureNewWebBeanComponent(child);
- }
+ webBeanDeclerationList.add(child);
} else if (XMLUtil.isElementDeployDeclaration(child))
{
@@ -176,6 +171,29 @@
DeploymentTypeManager.getInstance().addNewDeploymentType(Production.class, 1);
}
}
+
+ //Configures the WebBeans components
+ configureWebBeansComponents(webBeanDeclerationList);
+
+ }
+
+ private static void configureWebBeansComponents(List<Element> webBeanDecleration)
+ {
+ if(!webBeanDecleration.isEmpty())
+ {
+ Iterator<Element> it = webBeanDecleration.iterator();
+ while (it.hasNext())
+ {
+ Element child = it.next();
+ if (XMLUtil.isElementJMSDeclaration(child))
+ {
+ configureJMSEndpointComponent(child);
+ } else
+ {
+ configureNewWebBeanComponent(child);
+ }
+ }
+ }
}
private static void configureInterceptorsElement(Element interceptorsElement)
@@ -770,6 +788,12 @@
}
+ /**
+ * Configures the binding types of the web beans component.
+ *
+ * @param component web beans xml component
+ * @param anns annotations defined in the xml documents
+ */
private static <T> void configureBindingType(XMLComponentImpl<T> component, Annotation[] anns)
{
boolean isDefined = AnnotationUtil.isMetaAnnotationExist(anns, BindingType.class);