openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r901180 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
Date Wed, 20 Jan 2010 13:15:41 GMT
Author: struberg
Date: Wed Jan 20 13:15:40 2010
New Revision: 901180

URL: http://svn.apache.org/viewvc?rev=901180&view=rev
Log:
OWB-207 <interceptors> may now be defined in multiple beans.xml

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java?rev=901180&r1=901179&r2=901180&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
Wed Jan 20 13:15:40 2010
@@ -89,12 +89,6 @@
 {
     private static final WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansXMLConfigurator.class);
     
-    /** Enabled Interceptors element check */
-    private boolean INTERCEPTORS_IS_DEFINED = false;
-
-    /** Enabled Decorators element check */
-    private boolean DECORATORS_IS_DEFINED = false;    
-
     /** Current configuration file name */
     private String CURRENT_SCAN_FILE_NAME = null;
     
@@ -259,30 +253,12 @@
             /* <Interceptors> element decleration */
             else if (XMLUtil.isElementInterceptorsDeclaration(child))
             {
-                if (INTERCEPTORS_IS_DEFINED)
-                {
-                    throw new WebBeansConfigurationException("There can not be more than
one web-beans.xml file that declares <Interceptors> element");
-                }
-                else
-                {
-                    configureInterceptorsElement(child);
-                    INTERCEPTORS_IS_DEFINED = true;
-
-                }
+                configureInterceptorsElement(child);
             }
             /* <Decorators> element decleration */
             else if (XMLUtil.isElementDecoratosDeclaration(child))
             {
-                if (DECORATORS_IS_DEFINED)
-                {
-                    throw new WebBeansConfigurationException("There can not be more than
one web-beans.xml file that declares <Decorators> element");
-                }
-                else
-                {
-                    configureDecoratorsElement(child);
-                    DECORATORS_IS_DEFINED = true;
-
-                }
+                configureDecoratorsElement(child);
             }
             /* <BindingType> annotation element decleration */
             else if (XMLUtil.isElementBindingTypeDecleration(child))
@@ -335,30 +311,12 @@
             /* <Interceptors> element decleration */
             if (XMLUtil.getName(child).equals(WebBeansConstants.WEB_BEANS_XML_SPEC_SPECIFIC_INTERCEPTORS_ELEMENT))
             {
-                if (INTERCEPTORS_IS_DEFINED)
-                {
-                    throw new WebBeansConfigurationException("There can not be more than
one web-beans.xml file that declares <interceptors> element");
-                }
-                else
-                {
-                    configureInterceptorsElement(child);
-                    INTERCEPTORS_IS_DEFINED = true;
-
-                }
+                configureInterceptorsElement(child);
             }
             /* <Decorators> element decleration */
             else if (XMLUtil.getName(child).equals(WebBeansConstants.WEB_BEANS_XML_SPEC_SPECIFIC_DECORATORS_ELEMENT))
             {
-                if (DECORATORS_IS_DEFINED)
-                {
-                    throw new WebBeansConfigurationException("There can not be more than
one web-beans.xml file that declares <decorators> element");
-                }
-                else
-                {
-                    configureDecoratorsElement(child);
-                    DECORATORS_IS_DEFINED = true;
-
-                }
+                configureDecoratorsElement(child);
             }
             else if(XMLUtil.getName(child).equals(WebBeansConstants.WEB_BEANS_XML_SPEC_SPECIFIC_ALTERNATIVES))
             {



Mime
View raw message