This is an automated email from the ASF dual-hosted git repository.

struberg 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 b0c9351  OWB-1375 add hack to properly create proxies even with Java16 
onwards.
b0c9351 is described below

commit b0c935191f748be3c3a3623e875be778d09f2e5c
Author: Mark Struberg <strub...@apache.org>
AuthorDate: Sun Mar 14 12:16:27 2021 +0100

    OWB-1375 add hack to properly create proxies even with Java16 onwards.
    
    Note that this is really a hack. The other option is to use the following
    in any META-INF/openwebbeans/openwebeans.propertites:
    
org.apache.webbeans.spi.DefiningClassService=org.apache.webbeans.service.ClassLoaderProxyService
---
 pom.xml                                               | 19 +++++++++++++++++++
 .../META-INF/openwebbeans/openwebbeans.properties     |  7 +++++++
 2 files changed, 26 insertions(+)

diff --git a/pom.xml b/pom.xml
index 54a58ac..2ff13a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -848,6 +848,25 @@
 
     <profiles>
         <profile>
+            <id>java16-hacks</id>
+            <activation>
+                <jdk>16</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <argLine>--add-exports 
java.base/jdk.internal.misc=ALL-UNNAMED</argLine>
+                        </configuration>
+
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
             <id>reporting</id>
             <activation>
                 <property>
diff --git 
a/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
 
b/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
index 0891473..be7125f 100644
--- 
a/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
+++ 
b/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
@@ -35,6 +35,13 @@ configuration.ordinal=10
 
org.apache.webbeans.spi.ContainerLifecycle=org.apache.webbeans.lifecycle.StandaloneLifeCycle
 
################################################################################################
 
+################################### Default Container Lifecycle 
################################
+# Use a specific DefiningClassService
+# By default we try sun.misc.Unsafe, and if this is not allowed, we do use
+# org.apache.webbeans.service.ClassLoaderProxyService as fallback
+# 
org.apache.webbeans.spi.DefiningClassService=org.apache.webbeans.service.ClassLoaderProxyService
+################################################################################################
+
 ################################### Default JNDI Service 
#######################################
 #Default implementation of org.apache.webbeans.corespi.JNDIService.
 
org.apache.webbeans.spi.JNDIService=org.apache.webbeans.corespi.se.DefaultJndiService

Reply via email to