You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by rm...@apache.org on 2021/01/02 20:51:08 UTC

[openwebbeans] branch master updated: [OWB-1363] ensure OWBInitializer can easily switch its default scanner service (original one, can be != runtime one but takes the configuration phase of the SeContainer initializer)

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 7bc2726  [OWB-1363] ensure OWBInitializer can easily switch its default scanner service (original one, can be != runtime one but takes the configuration phase of the SeContainer initializer)
7bc2726 is described below

commit 7bc2726d1e94dbe060aa9b2bc532cb3e57c90416
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Sat Jan 2 21:51:02 2021 +0100

    [OWB-1363] ensure OWBInitializer can easily switch its default scanner service (original one, can be != runtime one but takes the configuration phase of the SeContainer initializer)
---
 .../src/main/java/org/apache/openwebbeans/se/OWBInitializer.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBInitializer.java b/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBInitializer.java
index a4a47b5..5a35d44 100644
--- a/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBInitializer.java
+++ b/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBInitializer.java
@@ -50,7 +50,7 @@ import static java.util.stream.Collectors.toMap;
 
 public class OWBInitializer extends SeContainerInitializer
 {
-    protected final CDISeScannerService scannerService = new CDISeScannerService();
+    protected final CDISeScannerService scannerService = createDefaultScannerService();
     protected final Properties properties = new Properties();
     protected final Map<String, Object> services = new HashMap<>();
     protected final Collection<Extension> extensions = new ArrayList<>();
@@ -62,6 +62,11 @@ public class OWBInitializer extends SeContainerInitializer
         scannerService.loader(loader);
     }
 
+    protected CDISeScannerService createDefaultScannerService()
+    {
+        return new CDISeScannerService();
+    }
+
     @Override
     public SeContainer initialize()
     {
@@ -108,7 +113,6 @@ public class OWBInitializer extends SeContainerInitializer
             thread.setContextClassLoader(old);
         }
     }
-
     protected void addCustomServices(final Map<String, Object> services)
     {
         // for children classes