This closes #3421
This commit is contained in:
commit
95e65b8f76
|
@ -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>
|
|
@ -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
|
|
@ -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>
|
|
@ -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
|
|
@ -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>
|
|
@ -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>
|
|
@ -16,9 +16,13 @@
|
|||
*/
|
||||
package org.apache.activemq.artemis.jms.client;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import javax.jms.ConnectionMetaData;
|
||||
import javax.jms.JMSException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Properties;
|
||||
import java.util.Vector;
|
||||
|
||||
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.
|
||||
*/
|
||||
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 -----------------------------------------------------
|
||||
|
||||
private static final String ACTIVEMQ = "ActiveMQ";
|
||||
|
@ -50,17 +72,17 @@ public class ActiveMQConnectionMetaData implements ConnectionMetaData {
|
|||
|
||||
@Override
|
||||
public String getJMSVersion() throws JMSException {
|
||||
return "2.0";
|
||||
return JMS_VERSION_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJMSMajorVersion() throws JMSException {
|
||||
return 2;
|
||||
return JMS_MAJOR_VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJMSMinorVersion() throws JMSException {
|
||||
return 0;
|
||||
return JMS_MINOR_VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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
|
|
@ -16,8 +16,11 @@
|
|||
*/
|
||||
package org.apache.activemq.artemis.ra;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import javax.jms.ConnectionMetaData;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Properties;
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
|
@ -25,6 +28,24 @@ import java.util.Vector;
|
|||
*/
|
||||
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
|
||||
*/
|
||||
|
@ -44,8 +65,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
|
||||
ActiveMQRALogger.LOGGER.trace("getJMSVersion()");
|
||||
}
|
||||
|
||||
return "2.0";
|
||||
return JMS_VERSION_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -58,8 +78,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
|
||||
ActiveMQRALogger.LOGGER.trace("getJMSMajorVersion()");
|
||||
}
|
||||
|
||||
return 2;
|
||||
return JMS_MAJOR_VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,8 +91,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
|
||||
ActiveMQRALogger.LOGGER.trace("getJMSMinorVersion()");
|
||||
}
|
||||
|
||||
return 0;
|
||||
return JMS_MINOR_VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
58
pom.xml
|
@ -47,11 +47,15 @@
|
|||
<module>artemis-jms-client</module>
|
||||
<module>artemis-jms-client-all</module>
|
||||
<module>artemis-jms-client-osgi</module>
|
||||
<module>artemis-jakarta-client</module>
|
||||
<module>artemis-jms-server</module>
|
||||
<module>artemis-jakarta-server</module>
|
||||
<module>artemis-journal</module>
|
||||
<module>artemis-ra</module>
|
||||
<module>artemis-jakarta-ra</module>
|
||||
<module>artemis-rest</module>
|
||||
<module>artemis-service-extensions</module>
|
||||
<module>artemis-jakarta-service-extensions</module>
|
||||
<module>artemis-jdbc-store</module>
|
||||
<module>artemis-maven-plugin</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.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>
|
||||
<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>
|
||||
<arquillian-weld-embedded.version>2.0.0.Beta3</arquillian-weld-embedded.version>
|
||||
<owb.version>1.7.0</owb.version>
|
||||
|
@ -130,12 +140,14 @@
|
|||
<version.micrometer>1.6.1</version.micrometer>
|
||||
<hamcrest.version>2.1</hamcrest.version>
|
||||
<surefire.version>2.22.2</surefire.version>
|
||||
<!-- for JakrtaEE -->
|
||||
<version.batavia>1.0.5.Final</version.batavia>
|
||||
|
||||
<!-- used on tests -->
|
||||
<groovy.version>2.5.10</groovy.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>
|
||||
|
||||
<activemq.version.versionName>${project.version}</activemq.version.versionName>
|
||||
|
@ -442,7 +454,42 @@
|
|||
<version>${geronimo.jms.2.spec.version}</version>
|
||||
<!-- License: Apache 2.0 -->
|
||||
</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>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
|
@ -1503,6 +1550,11 @@
|
|||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.wildfly.extras.batavia</groupId>
|
||||
<artifactId>transformer-tools-mvn</artifactId>
|
||||
<version>${version.batavia}</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
|
@ -1815,8 +1867,6 @@
|
|||
</artifactItems>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -334,6 +334,34 @@
|
|||
</libList>
|
||||
<variableName>ARTEMIS-SNAPSHOT</variableName>
|
||||
</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>
|
||||
<phase>compile</phase>
|
||||
|
@ -639,6 +667,10 @@
|
|||
<name>ARTEMIS-270</name>
|
||||
<value>${ARTEMIS-270}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>ARTEMIS-JAKARTAEE</name>
|
||||
<value>${ARTEMIS-JAKARTAEE}</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
<skipTests>${skipCompatibilityTests}</skipTests>
|
||||
<argLine>${modular.jdk.surefire.arg} -Djgroups.bind_addr=::1 ${activemq-surefire-argline}</argLine>
|
||||
|
|
|
@ -28,6 +28,7 @@ import groovy.lang.GroovyShell;
|
|||
public class GroovyRun {
|
||||
|
||||
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_FOUR = "ARTEMIS-140";
|
||||
public static final String TWO_ZERO = "ARTEMIS-200";
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
||||
|
|
@ -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();
|
|
@ -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();
|
||||
|
||||
|
||||
|
|
@ -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();
|
|
@ -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();
|
||||
|
||||
|
||||
|
|
@ -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);
|
||||
}
|
|
@ -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();
|
||||
|
||||
|
||||
|
|
@ -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();
|
|
@ -16,6 +16,8 @@
|
|||
*/
|
||||
package org.apache.activemq.artemis.tests.compatibility;
|
||||
|
||||
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
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, SNAPSHOT, ONE_FIVE});
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -78,7 +86,11 @@ public class JmsReplyToQueueTest extends VersionedBase {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
evaluate(receiverClassloader, "jmsReplyToQueue/receiveMessages.groovy", receiver);
|
||||
if (JAKARTAEE.equals(receiver)) {
|
||||
evaluate(receiverClassloader, "jakartaReplyToQueue/receiveMessages.groovy", receiver);
|
||||
} else {
|
||||
evaluate(receiverClassloader, "jmsReplyToQueue/receiveMessages.groovy", receiver);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
errors.incrementAndGet();
|
||||
|
@ -94,7 +106,11 @@ public class JmsReplyToQueueTest extends VersionedBase {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
evaluate(senderClassloader, "jmsReplyToQueue/sendMessagesAddress.groovy", sender);
|
||||
if (JAKARTAEE.equals(sender)) {
|
||||
evaluate(senderClassloader, "jakartaReplyToQueue/sendMessagesAddress.groovy", sender);
|
||||
} else {
|
||||
evaluate(senderClassloader, "jmsReplyToQueue/sendMessagesAddress.groovy", sender);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
errors.incrementAndGet();
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
*/
|
||||
package org.apache.activemq.artemis.tests.compatibility;
|
||||
|
||||
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
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, SNAPSHOT, ONE_FIVE});
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -78,7 +85,11 @@ public class JmsReplyToTempQueueTest extends VersionedBase {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
evaluate(receiverClassloader, "jmsReplyToTempQueue/receiveMessages.groovy", receiver);
|
||||
if (JAKARTAEE.equals(receiver)) {
|
||||
evaluate(receiverClassloader, "jakartaReplyToTempQueue/receiveMessages.groovy", receiver);
|
||||
} else {
|
||||
evaluate(receiverClassloader, "jmsReplyToTempQueue/receiveMessages.groovy", receiver);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
errors.incrementAndGet();
|
||||
|
@ -94,7 +105,11 @@ public class JmsReplyToTempQueueTest extends VersionedBase {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
evaluate(senderClassloader, "jmsReplyToTempQueue/sendMessagesAddress.groovy", sender);
|
||||
if (JAKARTAEE.equals(sender)) {
|
||||
evaluate(senderClassloader, "jakartaReplyToTempQueue/sendMessagesAddress.groovy", sender);
|
||||
} else {
|
||||
evaluate(senderClassloader, "jmsReplyToTempQueue/sendMessagesAddress.groovy", sender);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
errors.incrementAndGet();
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
*/
|
||||
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.utils.FileUtil;
|
||||
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, SNAPSHOT, ONE_FIVE});
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -78,7 +85,11 @@ public class JmsReplyToTempTopicTest extends VersionedBase {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
evaluate(receiverClassloader, "jmsReplyToTempTopic/receiveMessages.groovy", receiver);
|
||||
if (JAKARTAEE.equals(receiver)) {
|
||||
evaluate(receiverClassloader, "jakartaReplyToTempTopic/receiveMessages.groovy", receiver);
|
||||
} else {
|
||||
evaluate(receiverClassloader, "jmsReplyToTempTopic/receiveMessages.groovy", receiver);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
errors.incrementAndGet();
|
||||
|
@ -94,7 +105,11 @@ public class JmsReplyToTempTopicTest extends VersionedBase {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
evaluate(senderClassloader, "jmsReplyToTempTopic/sendMessagesAddress.groovy", sender);
|
||||
if (JAKARTAEE.equals(sender)) {
|
||||
evaluate(senderClassloader, "jakartaReplyToTempTopic/sendMessagesAddress.groovy", sender);
|
||||
} else {
|
||||
evaluate(senderClassloader, "jmsReplyToTempTopic/sendMessagesAddress.groovy", sender);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
errors.incrementAndGet();
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
*/
|
||||
package org.apache.activemq.artemis.tests.compatibility;
|
||||
|
||||
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
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, SNAPSHOT, ONE_FIVE});
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -78,7 +85,11 @@ public class JmsReplyToTopicTest extends VersionedBase {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
evaluate(receiverClassloader, "jmsReplyToTopic/receiveMessages.groovy", receiver);
|
||||
if (JAKARTAEE.equals(receiver)) {
|
||||
evaluate(receiverClassloader, "jakartaReplyToTopic/receiveMessages.groovy", receiver);
|
||||
} else {
|
||||
evaluate(receiverClassloader, "jmsReplyToTopic/receiveMessages.groovy", receiver);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
errors.incrementAndGet();
|
||||
|
@ -94,7 +105,11 @@ public class JmsReplyToTopicTest extends VersionedBase {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
evaluate(senderClassloader, "jmsReplyToTopic/sendMessagesAddress.groovy", sender);
|
||||
if (JAKARTAEE.equals(sender)) {
|
||||
evaluate(senderClassloader, "jakartaReplyToTopic/sendMessagesAddress.groovy", sender);
|
||||
} else {
|
||||
evaluate(senderClassloader, "jmsReplyToTopic/sendMessagesAddress.groovy", sender);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
errors.incrementAndGet();
|
||||
|
|
Loading…
Reference in New Issue