[openwebbeans] branch master updated: [OWB-1361] startup time improvements: enable to skip our noclassdeffound checks - in well known cases, enable to skip some cdi validations - once deployment is va

2020-12-26 Thread rmannibucau
This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git


The following commit(s) were added to refs/heads/master by this push:
 new 42524ee  [OWB-1361] startup time improvements: enable to skip our 
noclassdeffound checks - in well known cases, enable to skip some cdi 
validations - once deployment is validated it helps, skip anonymous and private 
classes earlier in the process, enable to skip PAT event when there is no 
observer for it (todo: same for PIP)
42524ee is described below

commit 42524ee28e0fc2ed63ed9edb99c31edd9aca2674
Author: Romain Manni-Bucau 
AuthorDate: Sat Dec 26 18:37:19 2020 +0100

[OWB-1361] startup time improvements: enable to skip our noclassdeffound 
checks - in well known cases, enable to skip some cdi validations - once 
deployment is validated it helps, skip anonymous and private classes earlier in 
the process, enable to skip PAT event when there is no observer for it (todo: 
same for PIP)
---
 .../org/apache/webbeans/config/BeansDeployer.java  |  35 ++-
 .../webbeans/config/OpenWebBeansConfiguration.java |   6 +
 .../corespi/scanner/AbstractMetaDataDiscovery.java |  14 +-
 .../apache/webbeans/event/NotificationManager.java | 309 +++--
 .../webbeans/portable/AnnotatedElementFactory.java |   2 +-
 .../java/org/apache/webbeans/util/ClassUtil.java   |  10 +-
 6 files changed, 215 insertions(+), 161 deletions(-)

diff --git 
a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java 
b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
index a7b2337..5eaf2c3 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
@@ -111,6 +111,7 @@ import javax.enterprise.inject.spi.Producer;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
 import java.net.URL;
@@ -164,6 +165,8 @@ public class BeansDeployer
 private final Map packageVetoCache = new HashMap<>();
 
 protected boolean skipVetoedOnPackages;
+protected boolean skipNoClassDefFoundTriggers;
+protected boolean skipValidations;
 
 /**
  * This BdaInfo is used for all manually added annotated types or in case
@@ -188,6 +191,9 @@ public class BeansDeployer
 discoverEjb = Boolean.parseBoolean(usage);
 skipVetoedOnPackages = 
Boolean.parseBoolean(this.webBeansContext.getOpenWebBeansConfiguration().getProperty(
 "org.apache.webbeans.spi.deployer.skipVetoedOnPackages"));
+skipValidations = 
Boolean.parseBoolean(this.webBeansContext.getOpenWebBeansConfiguration().getProperty(
+"org.apache.webbeans.spi.deployer.skipValidations"));
+skipNoClassDefFoundTriggers = 
this.webBeansContext.getOpenWebBeansConfiguration().isSkipNoClassDefFoundErrorTriggers();
 
 defaultBeanArchiveInformation = new 
DefaultBeanArchiveInformation("default");
 
defaultBeanArchiveInformation.setBeanDiscoveryMode(BeanDiscoveryMode.ALL);
@@ -313,15 +319,18 @@ public class BeansDeployer
 // drop no more needed memory data
 webBeansContext.getNotificationManager().afterStart();
 
-validateAlternatives(beanAttributesPerBda);
+if (!skipValidations)
+{
+validateAlternatives(beanAttributesPerBda);
 
-validateInjectionPoints();
-validateDisposeParameters();
+validateInjectionPoints();
+validateDisposeParameters();
 
-validateDecoratorDecoratedTypes();
-validateDecoratorGenericTypes();
+validateDecoratorDecoratedTypes();
+validateDecoratorGenericTypes();
 
-validateNames();
+validateNames();
+}
 
 if 
(webBeansContext.getNotificationManager().getObserverMethods().stream()
 .anyMatch(ObserverMethod::isAsync))
@@ -1295,10 +1304,11 @@ public class BeansDeployer
 if (classIndex != null)
 {
 AnnotatedElementFactory annotatedElementFactory = 
webBeansContext.getAnnotatedElementFactory();
-
+boolean hasPATObserver = 
webBeansContext.getNotificationManager().hasProcessAnnotatedTypeObservers();
 for (Class implClass : classIndex)
 {
-if (foundClasses.contains(implClass))
+if (foundClasses.contains(implClass) || 
implClass.isAnonymousClass() ||
+Modifier.isPrivate(implClass.getModifiers() /* likely 
inner class */))
 {
 // skip this class
 

[openwebbeans] branch master updated: [OWB-1360] better support of ProcessSyntheticObserverMethod

2020-12-26 Thread rmannibucau
This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git


The following commit(s) were added to refs/heads/master by this push:
 new 6d16b56  [OWB-1360] better support of ProcessSyntheticObserverMethod
6d16b56 is described below

commit 6d16b56e68b625ab7511dafdf2d98de6ea89b849
Author: Romain Manni-Bucau 
AuthorDate: Sat Dec 26 17:48:17 2020 +0100

[OWB-1360] better support of ProcessSyntheticObserverMethod
---
 webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java 
b/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
index 2ddeead..4ab8c20 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
@@ -1629,7 +1629,8 @@ public final class WebBeansUtil
 ProcessProducerField.class,
 ProcessProducerMethod.class,
 ProcessSessionBean.class,
-ProcessSyntheticAnnotatedType.class
+ProcessSyntheticAnnotatedType.class,
+ProcessSyntheticObserverMethod.class
 };
 
 private static final Set CONTAINER_EVENT_CLASSES_SET = new 
HashSet<>(Arrays.asList(CONTAINER_EVENT_CLASSES));



svn commit: r1069481 - in /websites: production/openwebbeans/content/index.html staging/openwebbeans/trunk/content/index.html

2020-12-26 Thread buildbot
Author: buildbot
Date: Sat Dec 26 10:35:07 2020
New Revision: 1069481

Log:
Dynamic update by buildbot for openwebbeans

Modified:
websites/production/openwebbeans/content/index.html
websites/staging/openwebbeans/trunk/content/index.html

Modified: websites/production/openwebbeans/content/index.html
==
(empty)

Modified: websites/staging/openwebbeans/trunk/content/index.html
==
(empty)