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

W-13846024 -added properties to look for illegal reflective access #520

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<description>Mule connector lets you easily send and receive messages to queues and topics for any message service which implements the JMS specification</description>

<properties>
<activemq.version>5.14.5</activemq.version>
<activemq.version>5.16.4</activemq.version>
<artemisVersion>2.25.0</artemisVersion>
<javaxJmsApiVersion>2.0.1</javaxJmsApiVersion>
<commonsIoVersion>2.11.0</commonsIoVersion>
Expand All @@ -40,9 +40,9 @@
<!-- Remove when a new parent version with MTF is available -->
<munit.input.directory>src/test/munit</munit.input.directory>
<munit.output.directory>${basedir}/target/test-mule/munit</munit.output.directory>
<munit.extensions.maven.plugin.version>1.1.3</munit.extensions.maven.plugin.version>
<munit.version>2.3.15</munit.version>
<mtf-tools.version>1.1.2</mtf-tools.version>
<munit.extensions.maven.plugin.version>1.2.0-SNAPSHOT</munit.extensions.maven.plugin.version>
<munit.version>3.1.0-SNAPSHOT</munit.version>
<mtf-tools.version>1.2.0-SNAPSHOT</mtf-tools.version>
<mavenResources.version>3.3.0</mavenResources.version>
<docker.maven.plugin.version>0.41.0</docker.maven.plugin.version>
<maven.helper.plugin.version>3.3.0</maven.helper.plugin.version>
Expand All @@ -55,6 +55,7 @@
<license.maven.plugin.version>4.2</license.maven.plugin.version>
<licensePath>LICENSE_HEADER_CPAL.txt</licensePath>
<licenseYear>2023</licenseYear>
<mtf.javaopts></mtf.javaopts>
</properties>

<dependencies>
Expand Down Expand Up @@ -359,6 +360,11 @@
<includeSnapshots>true</includeSnapshots>
</discoverRuntimes>
</runtimeConfiguration>
<environmentVariables>
<!-- Toggles the JDK17 style flag -->
<!-- ugly hack -->
<_JAVA_OPTIONS>-XX:+PrintCommandLineFlags ${mtf.javaopts}</_JAVA_OPTIONS>
</environmentVariables>
</configuration>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import static org.mule.runtime.api.meta.ExpressionSupport.NOT_SUPPORTED;
import static org.mule.runtime.core.api.util.ClassUtils.instantiateClass;

import org.apache.activemq.ActiveMQXAConnectionFactory;
import org.mule.extensions.jms.api.connection.factory.activemq.ActiveMQConnectionFactoryConfiguration;
import org.mule.extensions.jms.api.exception.JmsMissingLibraryException;
import org.mule.extensions.jms.internal.connection.exception.ActiveMQException;
Expand All @@ -25,6 +26,7 @@
import java.util.List;

import javax.jms.ConnectionFactory;
import javax.jms.Session;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.slf4j.Logger;
Expand Down Expand Up @@ -86,6 +88,8 @@ ConnectionFactory createDefaultConnectionFactory(boolean useSsl) throws ActiveMQ

this.connectionFactory = (ConnectionFactory) instantiateClass(factoryClass, factoryConfiguration.getBrokerUrl());
applyVendorSpecificConnectionFactoryProperties(connectionFactory);
if (this.connectionFactory instanceof ActiveMQXAConnectionFactory)
((ActiveMQXAConnectionFactory) connectionFactory).setXaAckMode(Session.AUTO_ACKNOWLEDGE);
return connectionFactory;
} catch (ClassNotFoundException e) {
String message =
Expand Down
6 changes: 3 additions & 3 deletions src/test/munit/reconnection/reconnection-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<jms:caching-strategy >
<jms:no-caching />
</jms:caching-strategy>
<!--<jms:xa-connection-pool minPoolSize="5" />-->
<!--<jms:factory-configuration enable-xa="true" brokerUrl="tcp://0.0.0.0:${connection.lost.port}" maxRedelivery="1"/>-->
<jms:factory-configuration brokerUrl="tcp://0.0.0.0:${connection.lost.port}"/>
<jms:xa-connection-pool minPoolSize="5" />
<jms:factory-configuration enable-xa="true" brokerUrl="tcp://0.0.0.0:${connection.lost.port}" maxRedelivery="-1"/>
<!-- <jms:factory-configuration brokerUrl="tcp://0.0.0.0:${connection.lost.port}"/>-->
</jms:active-mq-connection>

</jms:config>
Expand Down