openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1058749 [3/3] - in /openwebbeans/trunk: webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/proxy/ webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/util/ webbeans-el10/src/main/java/org/apache/webbeans/el10/ webbeans-impl/sr...
Date Thu, 13 Jan 2011 20:57:14 GMT
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java?rev=1058749&r1=1058748&r2=1058749&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java
Thu Jan 13 20:57:13 2011
@@ -65,7 +65,6 @@ import org.apache.webbeans.util.Asserts;
 import org.apache.webbeans.util.ClassUtil;
 import org.apache.webbeans.util.SecurityUtil;
 import org.apache.webbeans.util.WebBeansConstants;
-import org.apache.webbeans.util.WebBeansUtil;
 import static org.apache.webbeans.util.InjectionExceptionUtils.*;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -312,13 +311,26 @@ public final class XMLDefinitionUtil
         Iterator<Interceptor<?>> it = setInterceptors.iterator();
 
         List<InterceptorData> stack = component.getInterceptorStack();
+        WebBeansContext webBeansContext = component.getWebBeansContext();
+
         while (it.hasNext())
         {
             WebBeansInterceptor interceptor = (WebBeansInterceptor) it.next();
 
-            WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(),
AroundInvoke.class, false, true, stack, interceptorMethod, true);
-            WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(),
PostConstruct.class, false, true, stack, interceptorMethod, true);
-            WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(),
PreDestroy.class, false, true, stack, interceptorMethod, true);
+            webBeansContext.getWebBeansUtil()._configureInterceptorMethods((Interceptor<?>)
interceptor,
+                                                                                        
(Class<?>) interceptor.getClazz(),
+                                                                                        
AroundInvoke.class, false,
+                                                                                        
true, stack, interceptorMethod,
+                                                                                        
true);
+            webBeansContext.getWebBeansUtil()._configureInterceptorMethods((Interceptor<?>)
interceptor,
+                                                                                        
(Class<?>) interceptor.getClazz(),
+                                                                                        
PostConstruct.class, false,
+                                                                                        
true, stack, interceptorMethod,
+                                                                                        
true);
+            webBeansContext.getWebBeansUtil()._configureInterceptorMethods((Interceptor<?>)
interceptor,
+                                                                                        
(Class<?>) interceptor.getClazz(),
+                                                                                        
PreDestroy.class, false, true,
+                                                                                        
stack, interceptorMethod, true);
         }
 
     }
@@ -359,7 +371,7 @@ public final class XMLDefinitionUtil
 
     public static <T> void defineXMLSpecializes(XMLManagedBean<T> component,
List<Class<? extends Annotation>> annotationSet)
     {
-        WebBeansContext webBeansContext = WebBeansContext.getInstance();
+        WebBeansContext webBeansContext = component.getWebBeansContext();
         Iterator<Class<? extends Annotation>> it = annotationSet.iterator();
         while (it.hasNext())
         {
@@ -798,7 +810,7 @@ public final class XMLDefinitionUtil
      */
     public static <T, K> void defineXMLObservesMethod(XMLManagedBean<T> component,
Method observesMethod, Element observesMethodElement, String errorMessage)
     {
-        WebBeansContext webBeansContext = WebBeansContext.getInstance();
+        WebBeansContext webBeansContext = component.getWebBeansContext();
 
         component.addObservableMethod(observesMethod);
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java?rev=1058749&r1=1058748&r2=1058749&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java Thu
Jan 13 20:57:13 2011
@@ -98,9 +98,10 @@ public class XMLUtil
         {
             throw new WebBeansConfigurationException(log.getTokenString(OWBLogConst.EXCEPT_0012));
         }
+        WebBeansContext webBeansContext = WebBeansContext.getInstance();
         if (root.getNamespaceURI() != null)
         {
-            WebBeansContext.getInstance().getWebBeansNameSpaceContainer().
+            webBeansContext.getWebBeansNameSpaceContainer().
                     addNewPackageNameSpace(root.getNamespaceURI());
         }
         else
@@ -108,7 +109,7 @@ public class XMLUtil
             String attr = root.getAttribute("xmlns");
             if (attr != null)
             {
-                WebBeansContext.getInstance().getWebBeansNameSpaceContainer().
+                webBeansContext.getWebBeansNameSpaceContainer().
                         addNewPackageNameSpace(root.getNamespaceURI());
             }
         }
@@ -120,7 +121,7 @@ public class XMLUtil
             Attr attr = (Attr) attrs.item(i);
             if (attr.getName().toLowerCase().startsWith("xmlns"))
             {
-                WebBeansContext.getInstance().getWebBeansNameSpaceContainer().addNewPackageNameSpace(attr.getValue());
+                webBeansContext.getWebBeansNameSpaceContainer().addNewPackageNameSpace(attr.getValue());
             }
         }
     }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/specializes/logger/LoggerSpecializationTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/specializes/logger/LoggerSpecializationTest.java?rev=1058749&r1=1058748&r2=1058749&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/specializes/logger/LoggerSpecializationTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/specializes/logger/LoggerSpecializationTest.java
Thu Jan 13 20:57:13 2011
@@ -20,6 +20,7 @@ package org.apache.webbeans.test.unittes
 
 import java.io.InputStream;
 import java.util.ArrayList;
+
 import javax.enterprise.inject.spi.Bean;
 
 import junit.framework.Assert;
@@ -32,7 +33,6 @@ import org.apache.webbeans.test.componen
 import org.apache.webbeans.test.component.specializes.logger.SpecializedInjector;
 import org.apache.webbeans.test.component.specializes.logger.SystemLogger;
 import org.apache.webbeans.test.unittests.xml.XMLTest;
-import org.apache.webbeans.util.WebBeansUtil;
 import org.apache.webbeans.xml.WebBeansXMLConfigurator;
 import org.junit.Test;
 
@@ -97,8 +97,8 @@ public class LoggerSpecializationTest ex
         
         ArrayList<Class<?>> specialClassList = new ArrayList<Class<?>>();
         specialClassList.add(MockSpecializedLogger.class);
-        WebBeansUtil.configureSpecializations(specialClassList);
-        
+        WebBeansContext.getInstance().getWebBeansUtil()._configureSpecializations(specialClassList);
+
         Bean<SpecializedInjector> bean = defineManagedBean(SpecializedInjector.class);
         Object instance = getManager().getReference(bean, SpecializedInjector.class, getManager().createCreationalContext(bean));
         



Mime
View raw message