openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1797822 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Date Tue, 06 Jun 2017 20:40:48 GMT
Author: struberg
Date: Tue Jun  6 20:40:48 2017
New Revision: 1797822

URL: http://svn.apache.org/viewvc?rev=1797822&view=rev
Log:
OWB-1182 fire ProcessBean for Interceptors and Decorators

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java?rev=1797822&r1=1797821&r2=1797822&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Tue Jun  6 20:40:48 2017
@@ -73,6 +73,7 @@ import org.apache.webbeans.portable.even
 import org.apache.webbeans.portable.events.discovery.AnnotatedTypeConfiguratorHolder;
 import org.apache.webbeans.portable.events.discovery.BeforeBeanDiscoveryImpl;
 import org.apache.webbeans.portable.events.generics.GProcessAnnotatedType;
+import org.apache.webbeans.portable.events.generics.GProcessBean;
 import org.apache.webbeans.portable.events.generics.GProcessManagedBean;
 import org.apache.webbeans.spi.BdaScannerService;
 import org.apache.webbeans.spi.BeanArchiveService;
@@ -1703,6 +1704,15 @@ public class BeansDeployer
                 {
                     dbb.defineDecoratorRules();
                     DecoratorBean<T> decorator = dbb.getBean();
+
+                    //Fires ProcessBean
+                    ProcessBeanImpl<T> processBeanEvent = new GProcessBean(decorator,
annotatedType);
+                    webBeansContext.getBeanManagerImpl().fireEvent(processBeanEvent, true);
+                    processBeanEvent.setStarted();
+
+                    webBeansContext.getWebBeansUtil().inspectDefinitionErrorStack("There
are errors that are added by ProcessBean event observers for " +
+                        "interceptor beans. Look at logs for further details");
+
                     decoratorsManager.addDecorator(decorator);
                 }
             }
@@ -1718,6 +1728,15 @@ public class BeansDeployer
                 {
                     ibb.defineCdiInterceptorRules();
                     CdiInterceptorBean<T> interceptor = ibb.getBean();
+
+                    //Fires ProcessBean
+                    ProcessBeanImpl<T> processBeanEvent = new GProcessBean(interceptor,
annotatedType);
+                    webBeansContext.getBeanManagerImpl().fireEvent(processBeanEvent, true);
+                    processBeanEvent.setStarted();
+
+                    webBeansContext.getWebBeansUtil().inspectDefinitionErrorStack("There
are errors that are added by ProcessBean event observers for " +
+                        "interceptor beans. Look at logs for further details");
+
                     interceptorsManager.addCdiInterceptor(interceptor);
                 }
             }



Mime
View raw message