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

rzo1 pushed a commit to branch xbean-4.30-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/xbean-4.30-SNAPSHOT by this 
push:
     new 638b3fc862 Explicitly set the ctor arg types for jms queue
638b3fc862 is described below

commit 638b3fc8620e8be65e0d51429c7c46d038394897
Author: Richard Zowalla <[email protected]>
AuthorDate: Sun Jan 4 13:25:07 2026 +0100

    Explicitly set the ctor arg types for jms queue
---
 .../main/java/org/apache/openejb/assembler/classic/Assembler.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
index a7050bb98c..014d20bc6b 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
@@ -185,6 +185,7 @@ import jakarta.enterprise.inject.spi.Bean;
 import jakarta.enterprise.inject.spi.BeanManager;
 import jakarta.enterprise.inject.spi.DefinitionException;
 import jakarta.enterprise.inject.spi.DeploymentException;
+import jakarta.jms.Queue;
 import javax.management.DynamicMBean;
 import javax.management.InstanceNotFoundException;
 import javax.management.MBeanRegistrationException;
@@ -3153,7 +3154,7 @@ public class Assembler extends AssemblerTool implements 
org.apache.openejb.spi.A
                 }
             }
             serviceRecipe.setProperty("Definition", 
PropertiesHelper.propertiesToString(props));
-            //explicitly set the argument types to avoid ambiquity in factory 
resolution.
+            //explicitly set the argument types to avoid ambiguity in factory 
resolution.
             serviceRecipe.setConstructorArgTypes(
                     new Class[]{
                             String.class, boolean.class, Class.class, 
String.class,
@@ -3162,6 +3163,11 @@ public class Assembler extends AssemblerTool implements 
org.apache.openejb.spi.A
             );
         } // else: any other kind of resource relying on it? shouldnt be
 
+        //explicitly set the constructor types to avoid ambiguity in ctor 
resolution.
+        if (serviceInfo.types.contains("Queue") || 
serviceInfo.types.contains(Queue.class.getName())) {
+            serviceRecipe.setConstructorArgTypes(new Class[]{String.class});
+        }
+
         replaceResourceAdapterProperty(serviceRecipe);
 
         ClassLoader loader = Thread.currentThread().getContextClassLoader();

Reply via email to