You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2011/03/15 14:15:06 UTC

svn commit: r1081767 - in /openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/config/ main/java/org/apache/webbeans/container/ main/java/org/apache/webbeans/intercept/ main/java/org/apache/webbeans/intercept/webbeans/ main/java/org/apa...

Author: struberg
Date: Tue Mar 15 13:15:06 2011
New Revision: 1081767

URL: http://svn.apache.org/viewvc?rev=1081767&view=rev
Log:
OWB-545 further SecurityService cleanup

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java?rev=1081767&r1=1081766&r2=1081767&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java Tue Mar 15 13:15:06 2011
@@ -72,7 +72,6 @@ import org.apache.webbeans.event.EventUt
 import org.apache.webbeans.event.NotificationManager;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.intercept.InterceptorData;
-import org.apache.webbeans.intercept.WebBeansInterceptorConfig;
 import org.apache.webbeans.spi.api.ResourceReference;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.Asserts;
@@ -985,7 +984,7 @@ public final class DefinitionUtil
             for (Field field : fields)
             {
                 //Check for public fields
-                if(ClassUtil.isPublic(field.getModifiers()) && !Modifier.isStatic(field.getModifiers()))
+                if(Modifier.isPublic(field.getModifiers()) && !Modifier.isStatic(field.getModifiers()))
                 {
                     if(webBeansContext.getBeanManagerImpl().isNormalScope(component.getScope()))
                     {
@@ -1189,7 +1188,7 @@ public final class DefinitionUtil
         }
 
         // For every injection target bean
-        WebBeansInterceptorConfig.configure(bean, bean.getInterceptorStack());
+        bean.getWebBeansContext().getWebBeansInterceptorConfig().configure(bean, bean.getInterceptorStack());
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java?rev=1081767&r1=1081766&r2=1081767&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java Tue Mar 15 13:15:06 2011
@@ -41,6 +41,7 @@ import org.apache.webbeans.inject.Altern
 import org.apache.webbeans.inject.impl.InjectionPointFactory;
 import org.apache.webbeans.intercept.InterceptorUtil;
 import org.apache.webbeans.intercept.InterceptorsManager;
+import org.apache.webbeans.intercept.WebBeansInterceptorConfig;
 import org.apache.webbeans.intercept.ejb.EJBInterceptorConfig;
 import org.apache.webbeans.jms.JMSManager;
 import org.apache.webbeans.plugins.PluginLoader;
@@ -75,6 +76,7 @@ public class WebBeansContext
     private EJBInterceptorConfig ejbInterceptorConfig = new EJBInterceptorConfig(this);
     private ExtensionLoader extensionLoader = new ExtensionLoader(this);
     private InterceptorsManager interceptorsManager = new InterceptorsManager(this);
+    private WebBeansInterceptorConfig webBeansInterceptorConfig = new WebBeansInterceptorConfig(this);
     private JMSManager jmsManager = new JMSManager();
     private JavassistProxyFactory javassistProxyFactory = new JavassistProxyFactory();
     private OpenWebBeansConfiguration openWebBeansConfiguration = new OpenWebBeansConfiguration();
@@ -247,6 +249,11 @@ public class WebBeansContext
         return decoratorsManager;
     }
 
+    public WebBeansInterceptorConfig getWebBeansInterceptorConfig()
+    {
+        return webBeansInterceptorConfig;
+    }
+
     public EJBInterceptorConfig getEJBInterceptorConfig()
     {
         return ejbInterceptorConfig;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java?rev=1081767&r1=1081766&r2=1081767&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java Tue Mar 15 13:15:06 2011
@@ -79,7 +79,6 @@ import org.apache.webbeans.exception.Web
 import org.apache.webbeans.exception.definition.DuplicateDefinitionException;
 import org.apache.webbeans.exception.inject.DefinitionException;
 import org.apache.webbeans.intercept.InterceptorComparator;
-import org.apache.webbeans.intercept.WebBeansInterceptorConfig;
 import org.apache.webbeans.intercept.webbeans.WebBeansInterceptor;
 import org.apache.webbeans.plugins.OpenWebBeansJmsPlugin;
 import org.apache.webbeans.portable.AnnotatedElementFactory;
@@ -614,7 +613,7 @@ public class BeanManagerImpl implements 
     {
         webBeansContext.getAnnotationManager().checkInterceptorResolverParams(interceptorBindings);
 
-        Set<Interceptor<?>> intsSet = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(interceptorBindings, webBeansContext);
+        Set<Interceptor<?>> intsSet = webBeansContext.getWebBeansInterceptorConfig().findDeployedWebBeansInterceptor(interceptorBindings, webBeansContext);
         Iterator<Interceptor<?>> itSet = intsSet.iterator();
 
         List<Interceptor<?>> interceptorList = new ArrayList<Interceptor<?>>();

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java?rev=1081767&r1=1081766&r2=1081767&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java Tue Mar 15 13:15:06 2011
@@ -31,7 +31,6 @@ import org.apache.webbeans.plugins.OpenW
 import org.apache.webbeans.spi.BDABeansXmlScanner;
 import org.apache.webbeans.spi.ScannerService;
 import org.apache.webbeans.util.AnnotationUtil;
-import org.apache.webbeans.util.SecurityUtil;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -65,9 +64,6 @@ public final class WebBeansInterceptorCo
 
     private WebBeansContext webBeansContext;
 
-    /*
-     * Private
-     */
     public WebBeansInterceptorConfig(WebBeansContext webBeansContext)
     {
         this.webBeansContext = webBeansContext;
@@ -78,7 +74,7 @@ public final class WebBeansInterceptorCo
      *
      * @param interceptorBindingTypes interceptor class
      */
-    public static <T> void configureInterceptorClass(AbstractInjectionTargetBean<T> delegate, Annotation[] interceptorBindingTypes)
+    public <T> void configureInterceptorClass(AbstractInjectionTargetBean<T> delegate, Annotation[] interceptorBindingTypes)
     {
         if(delegate.getScope() != Dependent.class)
         {
@@ -123,7 +119,7 @@ public final class WebBeansInterceptorCo
 
     }
 
-    private static void checkAnns(List<Annotation> list, Annotation ann, Bean<?> bean)
+    private void checkAnns(List<Annotation> list, Annotation ann, Bean<?> bean)
     {
         for(Annotation old : list)
         {
@@ -140,9 +136,8 @@ public final class WebBeansInterceptorCo
     /**
      * Configures the given class for applicable interceptors.
      *
-     * @param clazz configuration interceptors for this
      */
-    public static void configure(AbstractInjectionTargetBean<?> component, List<InterceptorData> stack)
+    public void configure(AbstractInjectionTargetBean<?> component, List<InterceptorData> stack)
     {
         Class<?> clazz = ((AbstractOwbBean<?>)component).getReturnType();
         AnnotatedType<?> annotatedType = component.getAnnotatedType();
@@ -271,7 +266,7 @@ public final class WebBeansInterceptorCo
 
     }
 
-    private static void filterInterceptorsPerBDA(AbstractInjectionTargetBean<?> component, List<InterceptorData> stack)
+    private void filterInterceptorsPerBDA(AbstractInjectionTargetBean<?> component, List<InterceptorData> stack)
     {
 
         ScannerService scannerService = component.getWebBeansContext().getScannerService();
@@ -300,7 +295,7 @@ public final class WebBeansInterceptorCo
 
     }
 
-    public static void addComponentInterceptors(AbstractOwbBean<?> bean, Set<Interceptor<?>> set, List<InterceptorData> stack)
+    public void addComponentInterceptors(AbstractOwbBean<?> bean, Set<Interceptor<?>> set, List<InterceptorData> stack)
     {
         WebBeansContext webBeansContext = bean.getWebBeansContext();
         Iterator<Interceptor<?>> it = set.iterator();
@@ -322,27 +317,27 @@ public final class WebBeansInterceptorCo
             {
                 // interceptor binding
                 webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor, annotatedType,
-                                                                                             AroundInvoke.class, true,
-                                                                                             false, stack, null);
+                                                                             AroundInvoke.class, true,
+                                                                             false, stack, null);
                 webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor, annotatedType,
-                                                                                             PostConstruct.class, true,
-                                                                                             false, stack, null);
+                                                                             PostConstruct.class, true,
+                                                                             false, stack, null);
                 webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor, annotatedType,
-                                                                                             PreDestroy.class, true,
-                                                                                             false, stack, null);
+                                                                             PreDestroy.class, true,
+                                                                             false, stack, null);
 
                 if (null != ejbPlugin)
                 {
                     webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                 annotatedType,
-                                                                                                 prePassivateClass,
-                                                                                                 true, false, stack,
-                                                                                                 null);
+                                                                                 annotatedType,
+                                                                                 prePassivateClass,
+                                                                                 true, false, stack,
+                                                                                 null);
                     webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                 annotatedType,
-                                                                                                 postActivateClass,
-                                                                                                 true, false, stack,
-                                                                                                 null);
+                                                                                 annotatedType,
+                                                                                 postActivateClass,
+                                                                                 true, false, stack,
+                                                                                 null);
 
                 }
             }
@@ -350,30 +345,30 @@ public final class WebBeansInterceptorCo
             {
                 // interceptor binding
                 webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                             interceptor.getClazz(),
-                                                                                             AroundInvoke.class, true,
-                                                                                             false, stack, null, true);
+                                                                             interceptor.getClazz(),
+                                                                             AroundInvoke.class, true,
+                                                                             false, stack, null, true);
                 webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                             interceptor.getClazz(),
-                                                                                             PostConstruct.class, true,
-                                                                                             false, stack, null, true);
+                                                                             interceptor.getClazz(),
+                                                                             PostConstruct.class, true,
+                                                                             false, stack, null, true);
                 webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                             interceptor.getClazz(),
-                                                                                             PreDestroy.class, true,
-                                                                                             false, stack, null, true);
+                                                                             interceptor.getClazz(),
+                                                                             PreDestroy.class, true,
+                                                                             false, stack, null, true);
 
                 if (null != ejbPlugin)
                 {
                     webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                 interceptor.getClazz(),
-                                                                                                 prePassivateClass,
-                                                                                                 true, false, stack,
-                                                                                                 null, true);
+                                                                                 interceptor.getClazz(),
+                                                                                 prePassivateClass,
+                                                                                 true, false, stack,
+                                                                                 null, true);
                     webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                 interceptor.getClazz(),
-                                                                                                 postActivateClass,
-                                                                                                 true, false, stack,
-                                                                                                 null, true);
+                                                                                 interceptor.getClazz(),
+                                                                                 postActivateClass,
+                                                                                 true, false, stack,
+                                                                                 null, true);
 
                 }
 
@@ -390,7 +385,7 @@ public final class WebBeansInterceptorCo
      * @param componentInterceptors the configured interceptors from the component level
      * @param resolvedComponentInterceptorBindings complete (including transitive) set of component-level interceptor bindings
      */
-    private static void addMethodInterceptors(AbstractInjectionTargetBean<?> component, Class<?> clazz, List<InterceptorData> stack, Set<Interceptor<?>> componentInterceptors,
+    private void addMethodInterceptors(AbstractInjectionTargetBean<?> component, Class<?> clazz, List<InterceptorData> stack, Set<Interceptor<?>> componentInterceptors,
                                               Set<Annotation> resolvedComponentInterceptorBindings)
     {
         WebBeansContext webBeansContext = component.getWebBeansContext();
@@ -406,7 +401,7 @@ public final class WebBeansInterceptorCo
 
         //GE : I added for private, protected etc. methods.
         //Not just for public methods.
-        methods = SecurityUtil.doPrivilegedGetDeclaredMethods(clazz);
+        methods = webBeansContext.getSecurityService().doPrivilegedGetDeclaredMethods(clazz);
         for(Method m : methods)
         {
             set.add(m);
@@ -452,34 +447,34 @@ public final class WebBeansInterceptorCo
                     WebBeansInterceptor<?> interceptor = (WebBeansInterceptor<?>) it.next();
 
                     webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                 interceptor.getClazz(),
-                                                                                                 AroundInvoke.class,
-                                                                                                 true, true, stack,
-                                                                                                 method, true);
+                                                                                 interceptor.getClazz(),
+                                                                                 AroundInvoke.class,
+                                                                                 true, true, stack,
+                                                                                 method, true);
                     webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                 interceptor.getClazz(),
-                                                                                                 PostConstruct.class,
-                                                                                                 true, true, stack,
-                                                                                                 method, true);
+                                                                                 interceptor.getClazz(),
+                                                                                 PostConstruct.class,
+                                                                                 true, true, stack,
+                                                                                 method, true);
                     webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                 interceptor.getClazz(),
-                                                                                                 PreDestroy.class, true,
-                                                                                                 true, stack, method,
-                                                                                                 true);
+                                                                                 interceptor.getClazz(),
+                                                                                 PreDestroy.class, true,
+                                                                                 true, stack, method,
+                                                                                 true);
 
                     OpenWebBeansEjbLCAPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbLCAPlugin();
                     if (null != ejbPlugin)
                     {
                         webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                     interceptor.getClazz(),
-                                                                                                     ejbPlugin.getPrePassivateClass(),
-                                                                                                     true, true, stack,
-                                                                                                     method, true);
+                                                                                     interceptor.getClazz(),
+                                                                                     ejbPlugin.getPrePassivateClass(),
+                                                                                     true, true, stack,
+                                                                                     method, true);
                         webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                     interceptor.getClazz(),
-                                                                                                     ejbPlugin.getPostActivateClass(),
-                                                                                                     true, true, stack,
-                                                                                                     method, true);
+                                                                                     interceptor.getClazz(),
+                                                                                     ejbPlugin.getPostActivateClass(),
+                                                                                     true, true, stack,
+                                                                                     method, true);
                     }
 
 
@@ -490,7 +485,7 @@ public final class WebBeansInterceptorCo
     }
 
     @SuppressWarnings("unchecked")
-    private static <T> void addMethodInterceptors(AbstractInjectionTargetBean<?> component,
+    private <T> void addMethodInterceptors(AbstractInjectionTargetBean<?> component,
                                                   AnnotatedType<T> annotatedType,
                                                   List<InterceptorData> stack,
                                                   Set<Interceptor<?>> componentInterceptors)
@@ -568,38 +563,38 @@ public final class WebBeansInterceptorCo
                     if(interAnnoType == null)
                     {
                         webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                     interceptor.getClazz(),
-                                                                                                     AroundInvoke.class,
-                                                                                                     true, true, stack,
-                                                                                                     method, true);
+                                                                                     interceptor.getClazz(),
+                                                                                     AroundInvoke.class,
+                                                                                     true, true, stack,
+                                                                                     method, true);
                         webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                     interceptor.getClazz(),
-                                                                                                     PostConstruct.class,
-                                                                                                     true, true, stack,
-                                                                                                     method, true);
+                                                                                     interceptor.getClazz(),
+                                                                                     PostConstruct.class,
+                                                                                     true, true, stack,
+                                                                                     method, true);
                         webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                     interceptor.getClazz(),
-                                                                                                     PreDestroy.class,
-                                                                                                     true, true, stack,
-                                                                                                     method, true);
+                                                                                     interceptor.getClazz(),
+                                                                                     PreDestroy.class,
+                                                                                     true, true, stack,
+                                                                                     method, true);
                     }
                     else
                     {
                         webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                     interAnnoType,
-                                                                                                     AroundInvoke.class,
-                                                                                                     true, true, stack,
-                                                                                                     method);
+                                                                                     interAnnoType,
+                                                                                     AroundInvoke.class,
+                                                                                     true, true, stack,
+                                                                                     method);
                         webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                     interAnnoType,
-                                                                                                     PostConstruct.class,
-                                                                                                     true, true, stack,
-                                                                                                     method);
+                                                                                     interAnnoType,
+                                                                                     PostConstruct.class,
+                                                                                     true, true, stack,
+                                                                                     method);
                         webBeansContext.getWebBeansUtil().configureInterceptorMethods(interceptor,
-                                                                                                     interAnnoType,
-                                                                                                     PreDestroy.class,
-                                                                                                     true, true, stack,
-                                                                                                     method);
+                                                                                     interAnnoType,
+                                                                                     PreDestroy.class,
+                                                                                     true, true, stack,
+                                                                                     method);
                     }
                 }
             }
@@ -610,7 +605,7 @@ public final class WebBeansInterceptorCo
     /*
      * Find the deployed interceptors with given interceptor binding types.
      */
-    public static Set<Interceptor<?>> findDeployedWebBeansInterceptor(Annotation[] anns, WebBeansContext webBeansContext)
+    public Set<Interceptor<?>> findDeployedWebBeansInterceptor(Annotation[] anns, WebBeansContext webBeansContext)
     {
         Set<Interceptor<?>> set = new HashSet<Interceptor<?>>();
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java?rev=1081767&r1=1081766&r2=1081767&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java Tue Mar 15 13:15:06 2011
@@ -29,9 +29,7 @@ import org.apache.webbeans.exception.Web
 import org.apache.webbeans.inject.InjectableField;
 import org.apache.webbeans.inject.InjectableMethods;
 import org.apache.webbeans.intercept.OwbInterceptor;
-import org.apache.webbeans.intercept.WebBeansInterceptorConfig;
 import org.apache.webbeans.util.AnnotationUtil;
-import org.apache.webbeans.util.SecurityUtil;
 import org.apache.webbeans.util.WebBeansUtil;
 
 import javax.enterprise.context.spi.Context;
@@ -109,7 +107,7 @@ public class WebBeansInterceptor<T> exte
      */
     public void addInterceptorBinding(Class<? extends Annotation> binding, Annotation annot)
     {
-        Method[] methods = SecurityUtil.doPrivilegedGetDeclaredMethods(binding);
+        Method[] methods = webBeansContext.getSecurityService().doPrivilegedGetDeclaredMethods(binding);
 
         for (Method method : methods)
         {
@@ -216,7 +214,7 @@ public class WebBeansInterceptor<T> exte
             if (anns != null && anns.length > 0)
             {
                 // For example : @Transactional @Action Interceptor
-                Set<Interceptor<?>> metas = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(anns, webBeansContext);
+                Set<Interceptor<?>> metas = webBeansContext.getWebBeansInterceptorConfig().findDeployedWebBeansInterceptor(anns, webBeansContext);
                 set.addAll(metas);
 
                 // For each @Transactional and @Action Interceptor
@@ -224,7 +222,7 @@ public class WebBeansInterceptor<T> exte
                 {
                     Annotation[] simple = new Annotation[1];
                     simple[0] = ann;
-                    metas = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(simple, webBeansContext);
+                    metas = webBeansContext.getWebBeansInterceptorConfig().findDeployedWebBeansInterceptor(simple, webBeansContext);
                     set.addAll(metas);
                 }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=1081767&r1=1081766&r2=1081767&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java Tue Mar 15 13:15:06 2011
@@ -18,7 +18,6 @@
  */
 package org.apache.webbeans.util;
 
-import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.GenericArrayType;
 import java.lang.reflect.Method;
@@ -446,17 +445,6 @@ public final class ClassUtil
     }
 
     /**
-     * Check the modifiers contains the public keyword.
-     * 
-     * @param modifs modifiers
-     * @return true or false
-     */
-    public static boolean isPublic(int modifs)
-    {
-        return Modifier.isPublic(modifs);
-    }
-
-    /**
      * Gets java package if exist.
      * 
      * @param packageName package name

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java?rev=1081767&r1=1081766&r2=1081767&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java Tue Mar 15 13:15:06 2011
@@ -353,7 +353,7 @@ public final class WebBeansAnnotatedType
             
             Field field = annotatedField.getJavaMember();
             Annotation[] anns = AnnotationUtil.getAnnotationsFromSet(annotatedField.getAnnotations());
-            if(ClassUtil.isPublic(field.getModifiers()))
+            if(Modifier.isPublic(field.getModifiers()))
             {
                 if(!bean.getScope().equals(Dependent.class))
                 {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1081767&r1=1081766&r2=1081767&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java Tue Mar 15 13:15:06 2011
@@ -140,7 +140,6 @@ import org.apache.webbeans.inject.Altern
 import org.apache.webbeans.intercept.InterceptorData;
 import org.apache.webbeans.intercept.InterceptorDataImpl;
 import org.apache.webbeans.intercept.InterceptorType;
-import org.apache.webbeans.intercept.WebBeansInterceptorConfig;
 import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.plugins.OpenWebBeansEjbLCAPlugin;
 import org.apache.webbeans.plugins.PluginLoader;
@@ -2070,9 +2069,9 @@ public final class WebBeansUtil
 
             if (component != null)
             {
-                WebBeansInterceptorConfig.configureInterceptorClass((ManagedBean<Object>) component,
-                                                                    webBeansContext.getAnnotationManager().getInterceptorBindingMetaAnnotations(
-                                                                        clazz.getDeclaredAnnotations()));
+                webBeansContext.getWebBeansInterceptorConfig().configureInterceptorClass((ManagedBean<Object>) component,
+                        webBeansContext.getAnnotationManager().getInterceptorBindingMetaAnnotations(
+                                clazz.getDeclaredAnnotations()));
             }
             else
             {
@@ -3195,8 +3194,8 @@ public final class WebBeansUtil
                 Set<Annotation> annTypeSet = annotatedType.getAnnotations();
                 Annotation[] anns = annTypeSet.toArray(new Annotation[annTypeSet.size()]);
                 AnnotationManager annotationManager = webBeansContext.getAnnotationManager();
-                WebBeansInterceptorConfig.configureInterceptorClass(delegate,
-                                                                    annotationManager.getInterceptorBindingMetaAnnotations(anns));
+                webBeansContext.getWebBeansInterceptorConfig().configureInterceptorClass(delegate,
+                                                               annotationManager.getInterceptorBindingMetaAnnotations(anns));
             }
             else
             {

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java?rev=1081767&r1=1081766&r2=1081767&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java Tue Mar 15 13:15:06 2011
@@ -44,7 +44,6 @@ import org.apache.webbeans.context.Depen
 import org.apache.webbeans.decorator.DecoratorUtil;
 import org.apache.webbeans.decorator.WebBeansDecoratorConfig;
 import org.apache.webbeans.deployment.StereoTypeModel;
-import org.apache.webbeans.intercept.WebBeansInterceptorConfig;
 import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.portable.events.generics.GProcessAnnotatedType;
@@ -337,7 +336,7 @@ public abstract class TestContext implem
         webBeansContext.getInterceptorsManager().addNewInterceptor(clazz);
         webBeansContext.getInterceptorUtil().checkInterceptorConditions(clazz);
         component = webBeansContext.getManagedBeanConfigurator().define(clazz, WebBeansType.INTERCEPTOR);
-        WebBeansInterceptorConfig.configureInterceptorClass((ManagedBean<Object>) component,
+        webBeansContext.getWebBeansInterceptorConfig().configureInterceptorClass((ManagedBean<Object>) component,
                                                             webBeansContext.getAnnotationManager().getInterceptorBindingMetaAnnotations(
                                                                 clazz.getDeclaredAnnotations()));