You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by db...@apache.org on 2011/05/28 03:39:24 UTC

svn commit: r1128547 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java

Author: dblevins
Date: Sat May 28 01:39:23 2011
New Revision: 1128547

URL: http://svn.apache.org/viewvc?rev=1128547&view=rev
Log:
Reverting OWB-573

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.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=1128547&r1=1128546&r2=1128547&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 Sat May 28 01:39:23 2011
@@ -1169,6 +1169,18 @@ public final class DefinitionUtil
             //Check for injected fields in EJB @Interceptors
             List<InterceptorData> stack = new ArrayList<InterceptorData>();
             bean.getWebBeansContext().getEJBInterceptorConfig().configure(bean.getBeanClass(), stack);
+            for(InterceptorData data : stack)
+            {
+                if(data.isDefinedInInterceptorClass())
+                {
+                    AnnotationManager annotationManager = WebBeansContext.getInstance().getAnnotationManager();
+                    if(!annotationManager.checkInjectionPointForInterceptorPassivation(data.getInterceptorClass()))
+                    {
+                        throw new WebBeansConfigurationException("Enterprise bean : " + bean.toString() +
+                                                                 " interceptors must have serializable injection points");
+                    }
+                }
+            }
         }
 
         // For every injection target bean