Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] WLS JMS connector doesn't support named factory bean #6847

Closed
danielkec opened this issue May 18, 2023 · 1 comment · Fixed by #6922
Closed

[3.x] WLS JMS connector doesn't support named factory bean #6847

danielkec opened this issue May 18, 2023 · 1 comment · Fixed by #6922
Assignees
Labels
3.x Issues for 3.x version branch 4.x Version 4.x bug Something isn't working messaging Reactive Messaging P2

Comments

@danielkec
Copy link
Contributor

danielkec commented May 18, 2023

Reported by @msinghal123

Environment Details

  • Helidon Version: 3.x, 4.x

Problem Description

Due the fact that jndi setting takes precedent over named factory and WLS connector adds implicit jndi props, named factories are always ignored.

@danielkec danielkec self-assigned this May 18, 2023
@danielkec danielkec added messaging Reactive Messaging 3.x Issues for 3.x version branch 4.x Version 4.x labels May 18, 2023
@danielkec
Copy link
Contributor Author

Index: messaging/connectors/jms/src/main/java/io/helidon/messaging/connectors/jms/ConnectionContext.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/messaging/connectors/jms/src/main/java/io/helidon/messaging/connectors/jms/ConnectionContext.java b/messaging/connectors/jms/src/main/java/io/helidon/messaging/connectors/jms/ConnectionContext.java
--- a/messaging/connectors/jms/src/main/java/io/helidon/messaging/connectors/jms/ConnectionContext.java	(revision 8fe2a51a8fe596a682fda2bd8aa2a049b083d725)
+++ b/messaging/connectors/jms/src/main/java/io/helidon/messaging/connectors/jms/ConnectionContext.java	(date 1684416689594)
@@ -32,11 +32,7 @@
 import jakarta.jms.ConnectionFactory;
 import jakarta.jms.Destination;
 
-import static io.helidon.messaging.connectors.jms.JmsConnector.JNDI_ATTRIBUTE;
-import static io.helidon.messaging.connectors.jms.JmsConnector.JNDI_DESTINATION_ATTRIBUTE;
-import static io.helidon.messaging.connectors.jms.JmsConnector.JNDI_JMS_FACTORY_ATTRIBUTE;
-import static io.helidon.messaging.connectors.jms.JmsConnector.JNDI_JMS_FACTORY_DEFAULT;
-import static io.helidon.messaging.connectors.jms.JmsConnector.JNDI_PROPS_ATTRIBUTE;
+import static io.helidon.messaging.connectors.jms.JmsConnector.*;
 
 /**
  * Context related to one actual connection being constructed by JMS connector.
@@ -69,7 +65,8 @@
     }
 
     boolean isJndi() {
-        return config.get(JNDI_ATTRIBUTE).exists();
+        return config.get(JNDI_ATTRIBUTE).exists()
+                && !config.get(NAMED_FACTORY_ATTRIBUTE).exists();
     }
 
     Optional<? extends ConnectionFactory> lookupFactory() {

@m0mus m0mus added bug Something isn't working P2 labels May 25, 2023
@danielkec danielkec changed the title WLS JMS connector doesn't support named factory bean [3.x] WLS JMS connector doesn't support named factory bean May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues for 3.x version branch 4.x Version 4.x bug Something isn't working messaging Reactive Messaging P2
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants