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

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

commit 59b4b3ed6bea6c09915f5728a3824b413fe0517c
Author: Jean-Louis Monteiro <[email protected]>
AuthorDate: Wed Mar 30 13:23:50 2022 +0200

    Small trick with legacy test of course using javax namespace
---
 itests/legacy-client/pom.xml                                         | 5 +++++
 .../test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java  | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/itests/legacy-client/pom.xml b/itests/legacy-client/pom.xml
index f502702..ea0ee78 100644
--- a/itests/legacy-client/pom.xml
+++ b/itests/legacy-client/pom.xml
@@ -65,6 +65,11 @@
       <version>4.5.2</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>6.0-5</version>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>compile</scope>
diff --git 
a/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java
 
b/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java
index 218ab3c..8cfabb2 100644
--- 
a/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java
+++ 
b/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java
@@ -35,6 +35,7 @@ import jakarta.ejb.EJBException;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import java.io.File;
+import java.io.IOException;
 import java.net.URI;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -213,7 +214,7 @@ public class LegacyClientTest {
 
             final String name = bean.name();
             Assert.fail("Server should be destroyed: " + name);
-        } catch (final EJBException e) {
+        } catch (final javax.ejb.EJBException e) { // mind that since TomEE 9, 
we moved to jakarta, but old clients still see javax
             logger.info(String.format("Pass.  Request resulted in %s: %s", 
e.getCause().getClass().getSimpleName(), e.getMessage()));
             // good
         }

Reply via email to