[
https://issues.apache.org/jira/browse/ARTEMIS-3756?focusedWorklogId=760762&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-760762
]
ASF GitHub Bot logged work on ARTEMIS-3756:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Apr/22 11:49
Start Date: 22/Apr/22 11:49
Worklog Time Spent: 10m
Work Description: ehsavoie commented on code in PR #4009:
URL: https://github.com/apache/activemq-artemis/pull/4009#discussion_r856152230
##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java:
##########
@@ -111,22 +115,26 @@ public void testEmptyConnectionFactoryString() throws
NamingException, JMSExcept
//IIB v10 assumes this property is mandatory and sets it to an empty
string when not specified
props.put("java.naming.provider.url", "");
- new InitialContext(props);//Must not throw an exception
-
+ Context ctx = new InitialContext(props);//Must not throw an exception
+ ctx.close();
}
@Test
public void testConnectionFactoryStringWithInvalidParameter() throws
Exception {
+ Level initialLevel =
LogManager.getLogManager().getLogger("org.apache.activemq.artemis.core.client").getLevel();
+
LogManager.getLogManager().getLogger("org.apache.activemq.artemis.core.client").setLevel(Level.ALL);
Hashtable<String, String> props = new Hashtable<>();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
props.put("connectionFactory.ConnectionFactory",
"tcp://localhost:61616?foo=too");
AssertionLoggerHandler.startCapture();
try {
- new InitialContext(props);
- assertTrue("Expected to find AMQ212078",
AssertionLoggerHandler.findText("AMQ212078"));
+ Context ctx = new InitialContext(props);
+ ctx.close();
+ assertTrue("Connection factory parameter foo is not standard",
AssertionLoggerHandler.findText("Connection factory parameter foo is not
standard"));
Review Comment:
The code has been changed from
ActiveMQClientLogger.LOGGER.debug(String.format("Connection factory parameter
%s is not standard", key)); to logger.debugf("Connection factory parameter %s
is not standard", key); private static final Logger logger =
Logger.getLogger(TCPSchema.class); which is a different logger category !!!
this explains that
Issue Time Tracking
-------------------
Worklog Id: (was: 760762)
Time Spent: 1h 50m (was: 1h 40m)
> Connectors extra parameters are not passed throught the URI
> -----------------------------------------------------------
>
> Key: ARTEMIS-3756
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3756
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.21.0
> Reporter: Emmanuel Hugonnet
> Priority: Major
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> Since the connectors extra parameters are not passed through the URI when
> obtaining a ConnectionFactory by JNDI it won't be using them. This may be an
> issue for any SPI on the client side since it doesn't get the configuration
> defined on the server side.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)