deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject deltaspike git commit: DELTASPIKE-1289 move BeanManager injection to BeforeBeanDiscovery
Date Wed, 30 Aug 2017 07:21:52 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 651c9a569 -> edeff80a2


DELTASPIKE-1289 move BeanManager injection to BeforeBeanDiscovery

Slightly improves the performance to not need to resolve the BM
for every annotated type.


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/edeff80a
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/edeff80a
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/edeff80a

Branch: refs/heads/master
Commit: edeff80a283f124b395b19698b3bbf20db56c559
Parents: 651c9a5
Author: Mark Struberg <struberg@apache.org>
Authored: Wed Aug 30 09:21:00 2017 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Wed Aug 30 09:21:00 2017 +0200

----------------------------------------------------------------------
 .../core/impl/interceptor/GlobalInterceptorExtension.java      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/edeff80a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java
b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java
index 05796d5..9aab459 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java
@@ -32,12 +32,13 @@ import javax.interceptor.Interceptor;
 import java.lang.annotation.Annotation;
 import java.util.logging.Logger;
 
-//promotes deltaspike interceptors to global interceptors in case of cdi 1.1+
+// promotes deltaspike interceptors to global interceptors in case of cdi 1.1+
 public class GlobalInterceptorExtension implements Deactivatable, Extension
 {
     private static final Logger LOG = Logger.getLogger(GlobalInterceptorExtension.class.getName());
     private static final String DS_PACKAGE_NAME = "org.apache.deltaspike.";
     private Annotation priorityAnnotationInstance;
+    private BeanManager beanManager;
 
     @SuppressWarnings("UnusedDeclaration")
     protected void init(@Observes BeforeBeanDiscovery beforeBeanDiscovery, BeanManager beanManager)
@@ -47,11 +48,12 @@ public class GlobalInterceptorExtension implements Deactivatable, Extension
             return;
         }
 
+        this.beanManager = beanManager;
         int priorityValue = CoreBaseConfig.InterceptorCustomization.PRIORITY;
         priorityAnnotationInstance = AnnotationInstanceUtils.getPriorityAnnotationInstance(priorityValue);
     }
 
-    protected void promoteInterceptors(@Observes ProcessAnnotatedType pat, BeanManager beanManager)
+    protected void promoteInterceptors(@Observes ProcessAnnotatedType pat)
     {
         if (priorityAnnotationInstance == null) //not CDI 1.1 or the extension is deactivated
         {


Mime
View raw message