[ARTEMIS-3080]: Provide JakartaEE 9 artefacts.

* using batavia and eclipse transformer to transform JMS code to JakartaEE.
* adding a test with JakartaEE
* upgrading owasp plugin to 6.1.0

Jira: https://issues.apache.org/jira/browse/ARTEMIS-3080
This commit is contained in:
Emmanuel Hugonnet 2021-02-03 18:33:12 +01:00
parent 42e0afac51
commit 40f4c0218e
No known key found for this signature in database
GPG Key ID: 3DD1CCD4EDB2EE81
25 changed files with 1031 additions and 21 deletions

View File

@ -0,0 +1,94 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-pom</artifactId>
<version>2.17.0-SNAPSHOT</version>
</parent>
<artifactId>artemis-jakarta-client</artifactId>
<packaging>jar</packaging>
<name>ActiveMQ Artemis Jakarta Messaging Client</name>
<properties>
<activemq.basedir>${project.basedir}/..</activemq.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jms-client</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<!-- needed for the maven reactor -->
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-core-client</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-commons</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-selector</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.extras.batavia</groupId>
<artifactId>transformer-tools-mvn</artifactId>
<executions>
<execution>
<id>transform</id>
<phase>process-classes</phase>
<goals>
<goal>transform-classes</goal>
</goals>
<configuration>
<inputFile>${project.basedir}/../artemis-jms-client/target/classes/</inputFile>
<outputFolder>${project.build.outputDirectory}</outputFolder>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.wildfly.extras.batavia</groupId>
<artifactId>transformer-impl-eclipse</artifactId>
<version>${version.batavia}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
activemq.version.implementation.versionName=3.0
activemq.version.implementation.majorVersion=3
activemq.version.implementation.minorVersion=0

View File

@ -0,0 +1,72 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<name>ActiveMQ Artemis Jakarta RAR</name>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-pom</artifactId>
<version>2.17.0-SNAPSHOT</version>
</parent>
<artifactId>artemis-jakarta-ra</artifactId>
<packaging>jar</packaging>
<properties>
<activemq.basedir>${project.basedir}/..</activemq.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-ra</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.extras.batavia</groupId>
<artifactId>transformer-tools-mvn</artifactId>
<executions>
<execution>
<id>transform</id>
<phase>process-classes</phase>
<goals>
<goal>transform-classes</goal>
</goals>
<configuration>
<inputFile>${project.basedir}/../artemis-ra/target/classes/</inputFile>
<outputFolder>${project.build.outputDirectory}</outputFolder>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.wildfly.extras.batavia</groupId>
<artifactId>transformer-impl-eclipse</artifactId>
<version>${version.batavia}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
activemq.version.implementation.versionName=3.0
activemq.version.implementation.majorVersion=3
activemq.version.implementation.minorVersion=0

View File

@ -0,0 +1,71 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-pom</artifactId>
<version>2.17.0-SNAPSHOT</version>
</parent>
<artifactId>artemis-jakarta-server</artifactId>
<packaging>jar</packaging>
<name>ActiveMQ Artemis Jakarta Messaging Server</name>
<properties>
<activemq.basedir>${project.basedir}/..</activemq.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jms-server</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.extras.batavia</groupId>
<artifactId>transformer-tools-mvn</artifactId>
<executions>
<execution>
<id>transform</id>
<phase>process-classes</phase>
<goals>
<goal>transform-classes</goal>
</goals>
<configuration>
<inputFile>${project.basedir}/../artemis-jms-server/target/classes/</inputFile>
<outputFolder>${project.build.outputDirectory}</outputFolder>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.wildfly.extras.batavia</groupId>
<artifactId>transformer-impl-eclipse</artifactId>
<version>${version.batavia}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,71 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-pom</artifactId>
<version>2.17.0-SNAPSHOT</version>
</parent>
<artifactId>artemis-jakarta-service-extensions</artifactId>
<packaging>jar</packaging>
<name>ActiveMQ Artemis Jakarta Service Extensions</name>
<properties>
<activemq.basedir>${project.basedir}/..</activemq.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-service-extensions</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.extras.batavia</groupId>
<artifactId>transformer-tools-mvn</artifactId>
<executions>
<execution>
<id>transform</id>
<phase>process-classes</phase>
<goals>
<goal>transform-classes</goal>
</goals>
<configuration>
<inputFile>${project.basedir}/../artemis-service-extensions/target/classes/</inputFile>
<outputFolder>${project.build.outputDirectory}</outputFolder>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.wildfly.extras.batavia</groupId>
<artifactId>transformer-impl-eclipse</artifactId>
<version>${version.batavia}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -16,9 +16,13 @@
*/ */
package org.apache.activemq.artemis.jms.client; package org.apache.activemq.artemis.jms.client;
import java.io.IOException;
import java.io.InputStream;
import javax.jms.ConnectionMetaData; import javax.jms.ConnectionMetaData;
import javax.jms.JMSException; import javax.jms.JMSException;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Properties;
import java.util.Vector; import java.util.Vector;
import org.apache.activemq.artemis.core.version.Version; import org.apache.activemq.artemis.core.version.Version;
@ -27,6 +31,24 @@ import org.apache.activemq.artemis.core.version.Version;
* ActiveMQ Artemis implementation of a JMS ConnectionMetaData. * ActiveMQ Artemis implementation of a JMS ConnectionMetaData.
*/ */
public class ActiveMQConnectionMetaData implements ConnectionMetaData { public class ActiveMQConnectionMetaData implements ConnectionMetaData {
public static final String DEFAULT_PROP_FILE_NAME = "jms-version.properties";
private static final String JMS_VERSION_NAME;
private static final int JMS_MAJOR_VERSION;
private static final int JMS_MINOR_VERSION;
static {
Properties versionProps = new Properties();
try (InputStream in = ActiveMQConnectionMetaData.class.getClassLoader().getResourceAsStream(DEFAULT_PROP_FILE_NAME)) {
if (in != null) {
versionProps.load(in);
}
} catch (IOException e) {
}
JMS_VERSION_NAME = versionProps.getProperty("activemq.version.implementation.versionName", "2.0");
JMS_MAJOR_VERSION = Integer.valueOf(versionProps.getProperty("activemq.version.implementation.majorVersion", "2"));
JMS_MINOR_VERSION = Integer.valueOf(versionProps.getProperty("activemq.version.implementation.minorVersion", "0"));
}
// Constants ----------------------------------------------------- // Constants -----------------------------------------------------
private static final String ACTIVEMQ = "ActiveMQ"; private static final String ACTIVEMQ = "ActiveMQ";
@ -50,17 +72,17 @@ public class ActiveMQConnectionMetaData implements ConnectionMetaData {
@Override @Override
public String getJMSVersion() throws JMSException { public String getJMSVersion() throws JMSException {
return "2.0"; return JMS_VERSION_NAME;
} }
@Override @Override
public int getJMSMajorVersion() throws JMSException { public int getJMSMajorVersion() throws JMSException {
return 2; return JMS_MAJOR_VERSION;
} }
@Override @Override
public int getJMSMinorVersion() throws JMSException { public int getJMSMinorVersion() throws JMSException {
return 0; return JMS_MINOR_VERSION;
} }
@Override @Override

View File

@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
activemq.version.implementation.versionName=2.0
activemq.version.implementation.majorVersion=2
activemq.version.implementation.minorVersion=0

View File

@ -16,8 +16,11 @@
*/ */
package org.apache.activemq.artemis.ra; package org.apache.activemq.artemis.ra;
import java.io.IOException;
import java.io.InputStream;
import javax.jms.ConnectionMetaData; import javax.jms.ConnectionMetaData;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Properties;
import java.util.Vector; import java.util.Vector;
/** /**
@ -25,6 +28,24 @@ import java.util.Vector;
*/ */
public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
public static final String DEFAULT_PROP_FILE_NAME = "jms-version.properties";
private static final String JMS_VERSION_NAME;
private static final int JMS_MAJOR_VERSION;
private static final int JMS_MINOR_VERSION;
static {
Properties versionProps = new Properties();
try (InputStream in = ActiveMQRAConnectionMetaData.class.getClassLoader().getResourceAsStream(DEFAULT_PROP_FILE_NAME)) {
if (in != null) {
versionProps.load(in);
}
} catch (IOException e) {
}
JMS_VERSION_NAME = versionProps.getProperty("activemq.version.implementation.versionName", "2.0");
JMS_MAJOR_VERSION = Integer.valueOf(versionProps.getProperty("activemq.version.implementation.majorVersion", "2"));
JMS_MINOR_VERSION = Integer.valueOf(versionProps.getProperty("activemq.version.implementation.minorVersion", "0"));
}
/** /**
* Constructor * Constructor
*/ */
@ -44,8 +65,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
ActiveMQRALogger.LOGGER.trace("getJMSVersion()"); ActiveMQRALogger.LOGGER.trace("getJMSVersion()");
} }
return JMS_VERSION_NAME;
return "2.0";
} }
/** /**
@ -58,8 +78,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
ActiveMQRALogger.LOGGER.trace("getJMSMajorVersion()"); ActiveMQRALogger.LOGGER.trace("getJMSMajorVersion()");
} }
return JMS_MAJOR_VERSION;
return 2;
} }
/** /**
@ -72,8 +91,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
ActiveMQRALogger.LOGGER.trace("getJMSMinorVersion()"); ActiveMQRALogger.LOGGER.trace("getJMSMinorVersion()");
} }
return JMS_MINOR_VERSION;
return 0;
} }
/** /**

View File

@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
activemq.version.implementation.versionName=2.0
activemq.version.implementation.majorVersion=2
activemq.version.implementation.minorVersion=0

58
pom.xml
View File

@ -47,11 +47,15 @@
<module>artemis-jms-client</module> <module>artemis-jms-client</module>
<module>artemis-jms-client-all</module> <module>artemis-jms-client-all</module>
<module>artemis-jms-client-osgi</module> <module>artemis-jms-client-osgi</module>
<module>artemis-jakarta-client</module>
<module>artemis-jms-server</module> <module>artemis-jms-server</module>
<module>artemis-jakarta-server</module>
<module>artemis-journal</module> <module>artemis-journal</module>
<module>artemis-ra</module> <module>artemis-ra</module>
<module>artemis-jakarta-ra</module>
<module>artemis-rest</module> <module>artemis-rest</module>
<module>artemis-service-extensions</module> <module>artemis-service-extensions</module>
<module>artemis-jakarta-service-extensions</module>
<module>artemis-jdbc-store</module> <module>artemis-jdbc-store</module>
<module>artemis-maven-plugin</module> <module>artemis-maven-plugin</module>
<module>artemis-server-osgi</module> <module>artemis-server-osgi</module>
@ -119,6 +123,12 @@
<geronimo.ejb.3.0.spec.version>1.0.1</geronimo.ejb.3.0.spec.version> <geronimo.ejb.3.0.spec.version>1.0.1</geronimo.ejb.3.0.spec.version>
<geronimo.jta.1.1.spec.version>1.1.1</geronimo.jta.1.1.spec.version> <geronimo.jta.1.1.spec.version>1.1.1</geronimo.jta.1.1.spec.version>
<geronimo.jms.2.spec.version>1.0-alpha-2</geronimo.jms.2.spec.version> <geronimo.jms.2.spec.version>1.0-alpha-2</geronimo.jms.2.spec.version>
<jakarta.json-api.version>2.0.0</jakarta.json-api.version>
<jakarta.annotation-api.version>2.0.0</jakarta.annotation-api.version>
<jakarta.ejb-api.version>4.0.0</jakarta.ejb-api.version>
<jakarta.resource-api.version>2.0.0</jakarta.resource-api.version>
<jakarta.transaction-api.version>2.0.0</jakarta.transaction-api.version>
<jakarta.jms-api.version>3.0.0</jakarta.jms-api.version>
<weld.version>2.4.0.Final</weld.version> <weld.version>2.4.0.Final</weld.version>
<arquillian-weld-embedded.version>2.0.0.Beta3</arquillian-weld-embedded.version> <arquillian-weld-embedded.version>2.0.0.Beta3</arquillian-weld-embedded.version>
<owb.version>1.7.0</owb.version> <owb.version>1.7.0</owb.version>
@ -130,12 +140,14 @@
<version.micrometer>1.6.1</version.micrometer> <version.micrometer>1.6.1</version.micrometer>
<hamcrest.version>2.1</hamcrest.version> <hamcrest.version>2.1</hamcrest.version>
<surefire.version>2.22.2</surefire.version> <surefire.version>2.22.2</surefire.version>
<!-- for JakrtaEE -->
<version.batavia>1.0.5.Final</version.batavia>
<!-- used on tests --> <!-- used on tests -->
<groovy.version>2.5.10</groovy.version> <groovy.version>2.5.10</groovy.version>
<vertx.version>3.9.4</vertx.version> <vertx.version>3.9.4</vertx.version>
<owasp.version>1.4.3</owasp.version> <owasp.version>6.1.0</owasp.version>
<spring.version>5.1.7.RELEASE</spring.version> <spring.version>5.1.7.RELEASE</spring.version>
<activemq.version.versionName>${project.version}</activemq.version.versionName> <activemq.version.versionName>${project.version}</activemq.version.versionName>
@ -442,7 +454,42 @@
<version>${geronimo.jms.2.spec.version}</version> <version>${geronimo.jms.2.spec.version}</version>
<!-- License: Apache 2.0 --> <!-- License: Apache 2.0 -->
</dependency> </dependency>
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<version>${jakarta.jms-api.version}</version>
<!-- License: EPL 2.0 -->
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>${jakarta.transaction-api.version}</version>
<!-- License: EPL 2.0 -->
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta.json-api.version}</version>
<!-- License: EPL 2.0 -->
</dependency>
<dependency>
<groupId>jakarta.ejb</groupId>
<artifactId>jakarta.ejb-api</artifactId>
<version>${jakarta.ejb-api.version}</version>
<!-- License: EPL 2.0 -->
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta.annotation-api.version}</version>
<!-- License: EPL 2.0 -->
</dependency>
<dependency>
<groupId>jakarta.resource</groupId>
<artifactId>jakarta.resource-api</artifactId>
<version>${jakarta.resource-api.version}</version>
<!-- License: EPL 2.0 -->
</dependency>
<dependency> <dependency>
<groupId>commons-collections</groupId> <groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId> <artifactId>commons-collections</artifactId>
@ -1503,6 +1550,11 @@
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version> <version>2.7</version>
</plugin> </plugin>
<plugin>
<groupId>org.wildfly.extras.batavia</groupId>
<artifactId>transformer-tools-mvn</artifactId>
<version>${version.batavia}</version>
</plugin>
<plugin> <plugin>
<inherited>true</inherited> <inherited>true</inherited>
@ -1815,8 +1867,6 @@
</artifactItems> </artifactItems>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -334,6 +334,34 @@
</libList> </libList>
<variableName>ARTEMIS-SNAPSHOT</variableName> <variableName>ARTEMIS-SNAPSHOT</variableName>
</configuration> </configuration>
</execution><!-- The executions of dependency-scan will calculate dependencies for each specific version used here on this testsuite. -->
<execution>
<id>jakartaee</id>
<phase>compile</phase>
<goals>
<goal>dependency-scan</goal>
</goals>
<configuration>
<libListWithDeps>
<arg>org.apache.activemq:artemis-core-client:${project.version}</arg>
<arg>org.apache.activemq:artemis-commons:${project.version}</arg>
<arg>org.apache.activemq:artemis-selector:${project.version}</arg>
<arg>org.apache.activemq:artemis-server:${project.version}</arg>
<arg>org.apache.activemq:artemis-journal:${project.version}</arg>
<arg>org.apache.activemq:artemis-hornetq-protocol:${project.version}</arg>
<arg>org.codehaus.groovy:groovy-all:pom:${groovy.version}</arg>
</libListWithDeps>
<libList>
<arg>jakarta.json:jakarta.json-api:${jakarta.json-api.version}</arg>
<arg>jakarta.transaction:jakarta.transaction-api:${jakarta.transaction-api.version}</arg>
<arg>org.apache.activemq:artemis-jakarta-server:${project.version}</arg>
<arg>org.apache.activemq:artemis-jakarta-client:${project.version}</arg>
<arg>org.apache.activemq:artemis-jakarta-service-extensions:${project.version}</arg>
<arg>jakarta.jms:jakarta.jms-api:${jakarta.jms-api.version}</arg>
<arg>org.apache.activemq.tests:compatibility-tests:${project.version}</arg>
</libList>
<variableName>ARTEMIS-JAKARTAEE</variableName>
</configuration>
</execution> </execution>
<execution> <execution>
<phase>compile</phase> <phase>compile</phase>
@ -639,6 +667,10 @@
<name>ARTEMIS-270</name> <name>ARTEMIS-270</name>
<value>${ARTEMIS-270}</value> <value>${ARTEMIS-270}</value>
</property> </property>
<property>
<name>ARTEMIS-JAKARTAEE</name>
<value>${ARTEMIS-JAKARTAEE}</value>
</property>
</systemProperties> </systemProperties>
<skipTests>${skipCompatibilityTests}</skipTests> <skipTests>${skipCompatibilityTests}</skipTests>
<argLine>${modular.jdk.surefire.arg} -Djgroups.bind_addr=::1 ${activemq-surefire-argline}</argLine> <argLine>${modular.jdk.surefire.arg} -Djgroups.bind_addr=::1 ${activemq-surefire-argline}</argLine>

View File

@ -28,6 +28,7 @@ import groovy.lang.GroovyShell;
public class GroovyRun { public class GroovyRun {
public static final String SNAPSHOT = "ARTEMIS-SNAPSHOT"; public static final String SNAPSHOT = "ARTEMIS-SNAPSHOT";
public static final String JAKARTAEE = "ARTEMIS-JAKARTAEE";
public static final String ONE_FIVE = "ARTEMIS-155"; public static final String ONE_FIVE = "ARTEMIS-155";
public static final String ONE_FOUR = "ARTEMIS-140"; public static final String ONE_FOUR = "ARTEMIS-140";
public static final String TWO_ZERO = "ARTEMIS-200"; public static final String TWO_ZERO = "ARTEMIS-200";

View File

@ -0,0 +1,53 @@
package jmsReplyToQueue
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun
import jakarta.jms.*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
try {
cf.setEnable1xPrefixes(true);
} catch (Throwable totallyIgnored) {
// older versions will not have this method, dont even bother about seeing the stack trace or exception
}
Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Queue myQueue = session.createQueue("myQueue");
MessageConsumer queueConsumer = session.createConsumer(myQueue);
consumerCreated.countDown();
connection.start()
Message message = queueConsumer.receive(5000);
GroovyRun.assertNotNull(message)
session.commit();
queueConsumer.close();
MessageProducer producer = session.createProducer(message.getJMSReplyTo());
message = session.createMessage();
producer.send(message);
session.commit();
connection.close();
latch.countDown();

View File

@ -0,0 +1,52 @@
package jmsReplyToQueue
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun
import jakarta.jms.*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
try {
cf.setEnable1xPrefixes(true);
} catch (Throwable totallyIgnored) {
// older versions will not have this method, dont even bother about seeing the stack trace or exception
}
Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
connection.start();
Queue myQueue = session.createQueue("myQueue");
Queue temporaryQueue = session.createQueue("myTemporaryQueue");
MessageConsumer consumer = session.createConsumer(temporaryQueue);
MessageProducer queueProducer = session.createProducer(myQueue)
queueProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
Message message = session.createMessage();
message.setJMSReplyTo(temporaryQueue);
queueProducer.send(message);
session.commit();
message = consumer.receive(10000);
GroovyRun.assertNotNull(message);
session.commit();
connection.close();
senderLatch.countDown();

View File

@ -0,0 +1,53 @@
package jmsReplyToTempQueue
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun
import jakarta.jms.*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
try {
cf.setEnable1xPrefixes(true);
} catch (Throwable totallyIgnored) {
// older versions will not have this method, dont even bother about seeing the stack trace or exception
}
Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Queue myQueue = session.createQueue("myQueue");
MessageConsumer queueConsumer = session.createConsumer(myQueue);
consumerCreated.countDown();
connection.start()
Message message = queueConsumer.receive(5000);
GroovyRun.assertNotNull(message)
session.commit();
queueConsumer.close();
MessageProducer producer = session.createProducer(message.getJMSReplyTo());
message = session.createMessage();
producer.send(message);
session.commit();
connection.close();
latch.countDown();

View File

@ -0,0 +1,52 @@
package jmsReplyToTempQueue
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun
import jakarta.jms.*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
try {
cf.setEnable1xPrefixes(true);
} catch (Throwable totallyIgnored) {
// older versions will not have this method, dont even bother about seeing the stack trace or exception
}
Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
connection.start();
Queue myQueue = session.createQueue("myQueue");
Queue temporaryQueue = session.createTemporaryQueue();
MessageConsumer consumer = session.createConsumer(temporaryQueue);
MessageProducer queueProducer = session.createProducer(myQueue)
queueProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
Message message = session.createMessage();
message.setJMSReplyTo(temporaryQueue);
queueProducer.send(message);
session.commit();
message = consumer.receive(10000);
GroovyRun.assertNotNull(message);
session.commit();
connection.close();
senderLatch.countDown();

View File

@ -0,0 +1,59 @@
package jmsReplyToTempTopic
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun
import jakarta.jms.*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
try {
cf.setEnable1xPrefixes(true);
} catch (Throwable totallyIgnored) {
// older versions will not have this method, dont even bother about seeing the stack trace or exception
}
Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Queue myQueue = session.createQueue("myQueue");
GroovyRun.assertEquals("myQueue", myQueue.getQueueName());
MessageConsumer queueConsumer = session.createConsumer(myQueue);
consumerCreated.countDown();
connection.start()
for (int i = 0; i < 5; i++) {
Message message = queueConsumer.receive(5000);
GroovyRun.assertNotNull(message)
GroovyRun.assertEquals("myQueue", ((Queue)message.getJMSDestination()).getQueueName());
MessageProducer producer = session.createProducer(message.getJMSReplyTo());
message = session.createMessage();
producer.send(message);
}
queueConsumer.close();
session.commit();
connection.close();
latch.countDown();

View File

@ -0,0 +1,68 @@
package jmsReplyToTempTopic
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun
import jakarta.jms.*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
try {
cf.setEnable1xPrefixes(true);
} catch (Throwable totallyIgnored) {
// older versions will not have this method, dont even bother about seeing the stack trace or exception
}
Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
connection.start();
Queue myQueue = session.createQueue("myQueue");
GroovyRun.assertEquals("myQueue", myQueue.getQueueName());
TemporaryTopic replyTopic = session.createTemporaryTopic();
MessageConsumer consumer = session.createConsumer(replyTopic);
MessageProducer queueProducer = session.createProducer(myQueue)
queueProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
sendMessage(session.createTextMessage("hello"), replyTopic, myQueue, queueProducer);
sendMessage(session.createMapMessage(), replyTopic, myQueue, queueProducer);
sendMessage(session.createObjectMessage(), replyTopic, myQueue, queueProducer);
sendMessage(session.createStreamMessage(), replyTopic, myQueue, queueProducer);
sendMessage(session.createMessage(), replyTopic, myQueue, queueProducer);
session.commit();
for (int i = 0; i < 5; i++) {
message = consumer.receive(10000);
GroovyRun.assertNotNull(message);
}
GroovyRun.assertNull(consumer.receiveNoWait());
session.commit();
connection.close();
senderLatch.countDown();
void sendMessage(Message message, TemporaryTopic replyTopic, Queue myQueue, MessageProducer queueProducer) {
message.setJMSReplyTo(replyTopic);
queueProducer.send(message);
}

View File

@ -0,0 +1,53 @@
package jmsReplyToTopic
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun
import jakarta.jms.*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
try {
cf.setEnable1xPrefixes(true);
} catch (Throwable totallyIgnored) {
// older versions will not have this method, dont even bother about seeing the stack trace or exception
}
Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Queue myQueue = session.createQueue("myQueue");
MessageConsumer queueConsumer = session.createConsumer(myQueue);
consumerCreated.countDown();
connection.start()
Message message = queueConsumer.receive(5000);
GroovyRun.assertNotNull(message)
session.commit();
queueConsumer.close();
MessageProducer producer = session.createProducer(message.getJMSReplyTo());
message = session.createMessage();
producer.send(message);
session.commit();
connection.close();
latch.countDown();

View File

@ -0,0 +1,52 @@
package jmsReplyToTopic
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun
import jakarta.jms.*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
try {
cf.setEnable1xPrefixes(true);
} catch (Throwable totallyIgnored) {
// older versions will not have this method, dont even bother about seeing the stack trace or exception
}
Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
connection.start();
Queue myQueue = session.createQueue("myQueue");
Topic replyTopic = session.createTopic("myReplyTopic");
MessageConsumer consumer = session.createConsumer(replyTopic);
MessageProducer queueProducer = session.createProducer(myQueue)
queueProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
Message message = session.createMessage();
message.setJMSReplyTo(replyTopic);
queueProducer.send(message);
session.commit();
message = consumer.receive(10000);
GroovyRun.assertNotNull(message);
session.commit();
connection.close();
senderLatch.countDown();

View File

@ -16,6 +16,8 @@
*/ */
package org.apache.activemq.artemis.tests.compatibility; package org.apache.activemq.artemis.tests.compatibility;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -44,6 +46,12 @@ public class JmsReplyToQueueTest extends VersionedBase {
combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT}); combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT});
combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE});
combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, JAKARTAEE});
combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, SNAPSHOT});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, SNAPSHOT});
combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, JAKARTAEE});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FIVE});
combinations.add(new Object[]{JAKARTAEE, ONE_FIVE, JAKARTAEE});
return combinations; return combinations;
} }
@ -78,7 +86,11 @@ public class JmsReplyToQueueTest extends VersionedBase {
@Override @Override
public void run() { public void run() {
try { try {
if (JAKARTAEE.equals(receiver)) {
evaluate(receiverClassloader, "jakartaReplyToQueue/receiveMessages.groovy", receiver);
} else {
evaluate(receiverClassloader, "jmsReplyToQueue/receiveMessages.groovy", receiver); evaluate(receiverClassloader, "jmsReplyToQueue/receiveMessages.groovy", receiver);
}
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
errors.incrementAndGet(); errors.incrementAndGet();
@ -94,7 +106,11 @@ public class JmsReplyToQueueTest extends VersionedBase {
@Override @Override
public void run() { public void run() {
try { try {
if (JAKARTAEE.equals(sender)) {
evaluate(senderClassloader, "jakartaReplyToQueue/sendMessagesAddress.groovy", sender);
} else {
evaluate(senderClassloader, "jmsReplyToQueue/sendMessagesAddress.groovy", sender); evaluate(senderClassloader, "jmsReplyToQueue/sendMessagesAddress.groovy", sender);
}
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
errors.incrementAndGet(); errors.incrementAndGet();

View File

@ -16,6 +16,8 @@
*/ */
package org.apache.activemq.artemis.tests.compatibility; package org.apache.activemq.artemis.tests.compatibility;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -44,6 +46,11 @@ public class JmsReplyToTempQueueTest extends VersionedBase {
combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT}); combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT});
combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE});
combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, JAKARTAEE});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, SNAPSHOT});
combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, JAKARTAEE});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FIVE});
combinations.add(new Object[]{JAKARTAEE, ONE_FIVE, JAKARTAEE});
return combinations; return combinations;
} }
@ -78,7 +85,11 @@ public class JmsReplyToTempQueueTest extends VersionedBase {
@Override @Override
public void run() { public void run() {
try { try {
if (JAKARTAEE.equals(receiver)) {
evaluate(receiverClassloader, "jakartaReplyToTempQueue/receiveMessages.groovy", receiver);
} else {
evaluate(receiverClassloader, "jmsReplyToTempQueue/receiveMessages.groovy", receiver); evaluate(receiverClassloader, "jmsReplyToTempQueue/receiveMessages.groovy", receiver);
}
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
errors.incrementAndGet(); errors.incrementAndGet();
@ -94,7 +105,11 @@ public class JmsReplyToTempQueueTest extends VersionedBase {
@Override @Override
public void run() { public void run() {
try { try {
if (JAKARTAEE.equals(sender)) {
evaluate(senderClassloader, "jakartaReplyToTempQueue/sendMessagesAddress.groovy", sender);
} else {
evaluate(senderClassloader, "jmsReplyToTempQueue/sendMessagesAddress.groovy", sender); evaluate(senderClassloader, "jmsReplyToTempQueue/sendMessagesAddress.groovy", sender);
}
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
errors.incrementAndGet(); errors.incrementAndGet();

View File

@ -16,6 +16,8 @@
*/ */
package org.apache.activemq.artemis.tests.compatibility; package org.apache.activemq.artemis.tests.compatibility;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE;
import org.apache.activemq.artemis.tests.compatibility.base.VersionedBase; import org.apache.activemq.artemis.tests.compatibility.base.VersionedBase;
import org.apache.activemq.artemis.utils.FileUtil; import org.apache.activemq.artemis.utils.FileUtil;
import org.junit.After; import org.junit.After;
@ -44,6 +46,11 @@ public class JmsReplyToTempTopicTest extends VersionedBase {
combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT}); combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT});
combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE});
combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, JAKARTAEE});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, SNAPSHOT});
combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, JAKARTAEE});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FIVE});
combinations.add(new Object[]{JAKARTAEE, ONE_FIVE, JAKARTAEE});
return combinations; return combinations;
} }
@ -78,7 +85,11 @@ public class JmsReplyToTempTopicTest extends VersionedBase {
@Override @Override
public void run() { public void run() {
try { try {
if (JAKARTAEE.equals(receiver)) {
evaluate(receiverClassloader, "jakartaReplyToTempTopic/receiveMessages.groovy", receiver);
} else {
evaluate(receiverClassloader, "jmsReplyToTempTopic/receiveMessages.groovy", receiver); evaluate(receiverClassloader, "jmsReplyToTempTopic/receiveMessages.groovy", receiver);
}
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
errors.incrementAndGet(); errors.incrementAndGet();
@ -94,7 +105,11 @@ public class JmsReplyToTempTopicTest extends VersionedBase {
@Override @Override
public void run() { public void run() {
try { try {
if (JAKARTAEE.equals(sender)) {
evaluate(senderClassloader, "jakartaReplyToTempTopic/sendMessagesAddress.groovy", sender);
} else {
evaluate(senderClassloader, "jmsReplyToTempTopic/sendMessagesAddress.groovy", sender); evaluate(senderClassloader, "jmsReplyToTempTopic/sendMessagesAddress.groovy", sender);
}
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
errors.incrementAndGet(); errors.incrementAndGet();

View File

@ -16,6 +16,8 @@
*/ */
package org.apache.activemq.artemis.tests.compatibility; package org.apache.activemq.artemis.tests.compatibility;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -44,6 +46,11 @@ public class JmsReplyToTopicTest extends VersionedBase {
combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT}); combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT});
combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE});
combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, JAKARTAEE});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, SNAPSHOT});
combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, JAKARTAEE});
combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FIVE});
combinations.add(new Object[]{JAKARTAEE, ONE_FIVE, JAKARTAEE});
return combinations; return combinations;
} }
@ -78,7 +85,11 @@ public class JmsReplyToTopicTest extends VersionedBase {
@Override @Override
public void run() { public void run() {
try { try {
if (JAKARTAEE.equals(receiver)) {
evaluate(receiverClassloader, "jakartaReplyToTopic/receiveMessages.groovy", receiver);
} else {
evaluate(receiverClassloader, "jmsReplyToTopic/receiveMessages.groovy", receiver); evaluate(receiverClassloader, "jmsReplyToTopic/receiveMessages.groovy", receiver);
}
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
errors.incrementAndGet(); errors.incrementAndGet();
@ -94,7 +105,11 @@ public class JmsReplyToTopicTest extends VersionedBase {
@Override @Override
public void run() { public void run() {
try { try {
if (JAKARTAEE.equals(sender)) {
evaluate(senderClassloader, "jakartaReplyToTopic/sendMessagesAddress.groovy", sender);
} else {
evaluate(senderClassloader, "jmsReplyToTopic/sendMessagesAddress.groovy", sender); evaluate(senderClassloader, "jmsReplyToTopic/sendMessagesAddress.groovy", sender);
}
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
errors.incrementAndGet(); errors.incrementAndGet();