You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2022/09/21 09:39:26 UTC

[tomee] branch main updated (b8b130132d -> 06a0eaec16)

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

jlmonteiro pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git


    from b8b130132d Merge branch 'main' of github.com:apache/tomee into main
     new cee24df600 TOMEE-4048 Investigate EE classloading approach in openejb-client with filtering
     new 8442c4828f Merge branch 'main' of github.com:apache/tomee into main
     new 06a0eaec16 Avoid random failures with example MP Custom Health Check

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/test/java/org/superbiz/test/WeatherServiceTest.java           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


[tomee] 01/03: TOMEE-4048 Investigate EE classloading approach in openejb-client with filtering

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit cee24df6009d59002c5693e42fffaae24bfcb3ba
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Fri Sep 16 17:10:43 2022 +0200

    TOMEE-4048 Investigate EE classloading approach in openejb-client with filtering
---
 .../src/main/java/org/apache/openejb/client/Main.java         | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/server/openejb-client/src/main/java/org/apache/openejb/client/Main.java b/server/openejb-client/src/main/java/org/apache/openejb/client/Main.java
index 5ea87d1a3c..99edba2f46 100644
--- a/server/openejb-client/src/main/java/org/apache/openejb/client/Main.java
+++ b/server/openejb-client/src/main/java/org/apache/openejb/client/Main.java
@@ -22,6 +22,7 @@ import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.login.LoginContext;
 import java.io.File;
+import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -59,7 +60,15 @@ public class Main {
         if (classLoader == null) {
             classLoader = new URLClassLoader(new URL[]{file.toURI().toURL()});
         } else {
-            classLoader = new URLClassLoader(new URL[]{file.toURI().toURL()}, classLoader);
+            Class<?> classLoaderCLass = URLClassLoader.class;
+            try {
+                classLoaderCLass = classLoader.loadClass("org.apache.openejb.util.classloader.URLClassLoaderFirst");
+            } catch (final Exception e) {
+                // ignore
+            }
+            final Constructor<ClassLoader> constructor =
+                (Constructor<ClassLoader>) classLoaderCLass.getConstructor(URL[].class, ClassLoader.class);
+            classLoader = constructor.newInstance(new URL[]{file.toURI().toURL()}, classLoader);
         }
         Thread.currentThread().setContextClassLoader(classLoader);
 


[tomee] 03/03: Avoid random failures with example MP Custom Health Check

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit 06a0eaec162a545ad546642ec677c795b715f9af
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Wed Sep 21 11:39:06 2022 +0200

    Avoid random failures with example MP Custom Health Check
---
 .../src/test/java/org/superbiz/test/WeatherServiceTest.java           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/mp-custom-healthcheck/src/test/java/org/superbiz/test/WeatherServiceTest.java b/examples/mp-custom-healthcheck/src/test/java/org/superbiz/test/WeatherServiceTest.java
index 91ac2a81f9..35cc74932e 100644
--- a/examples/mp-custom-healthcheck/src/test/java/org/superbiz/test/WeatherServiceTest.java
+++ b/examples/mp-custom-healthcheck/src/test/java/org/superbiz/test/WeatherServiceTest.java
@@ -118,8 +118,8 @@ public class WeatherServiceTest {
                         "your subscription type. Please choose the proper subscription http://openweathermap.org/price",
                 data.getString("weatherServiceErrorMessage"));
 
-        assertEquals("OpenWeatherMap", checks.getJsonObject(0).getString("name"));
-        assertEquals("DOWN", checks.getJsonObject(0).getString("status"));
+        assertEquals("OpenWeatherMap", weatherJson.getString("name"));
+        assertEquals("DOWN", weatherJson.getString("status"));
     }
 
     @Test


[tomee] 02/03: Merge branch 'main' of github.com:apache/tomee into main

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit 8442c4828f88edcf7c969b0f223e40e3c6a414e2
Merge: cee24df600 b8b130132d
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Tue Sep 20 10:00:54 2022 +0200

    Merge branch 'main' of github.com:apache/tomee into main

 .../jwt/itest/SignatureAlgorithmsTest.java         | 155 +++++++++++++++++++++
 .../tomee/microprofile/jwt/itest/Tokens.java       |  41 ++++--
 2 files changed, 186 insertions(+), 10 deletions(-)