Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Move to Jakarta Messaging 3.0.0 (from javax.jmx to jakarta.jms) #153

Merged
merged 12 commits into from
Nov 4, 2024
11 changes: 1 addition & 10 deletions .github/workflows/tck-client-side-filters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8 for TCK Executor
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'temurin'
- name: Save JDK8 path
run: |
export JDK8_PATH=$JAVA_HOME
echo "JDK8_PATH=$JDK8_PATH" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
Expand All @@ -43,4 +34,4 @@ jobs:
run: mvn -B clean install -DskipTests -Dspotbugs.skip=true

- name: TCK tests - client side filters
run: JAVA_HOME=$JDK8_PATH mvn -B verify -DskipTests -Dmaven.main.skip=true -Dmaven.test.skip=true -Prun-tck
run: mvn -B verify -DskipTests -Dmaven.main.skip=true -Dmaven.test.skip=true -Prun-tck
11 changes: 1 addition & 10 deletions .github/workflows/tck-server-side-filters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8 for TCK Executor
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'temurin'
- name: Save JDK8 path
run: |
export JDK8_PATH=$JAVA_HOME
echo "JDK8_PATH=$JDK8_PATH" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
Expand All @@ -43,4 +34,4 @@ jobs:
run: mvn -B clean install -DskipTests -Dspotbugs.skip=true

- name: TCK tests - server side filters
run: JAVA_HOME=$JDK8_PATH mvn -B verify -DskipTests -Dmaven.main.skip=true -Dmaven.test.skip=true -Prun-tck-server-side-filters
run: mvn -B verify -DskipTests -Dmaven.main.skip=true -Dmaven.test.skip=true -Prun-tck-server-side-filters
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
${{ runner.os }}-maven-

- name: Build and test
run: mvn -B clean javadoc:javadoc verify
run: mvn -B clean javadoc:javadoc verify -DrerunFailingTestsCount=3

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.apache.activemq.filter;

import javax.jms.JMSException;
import jakarta.jms.JMSException;

/** An expression which performs an operation on two expression values */
public abstract class ArithmeticExpression extends BinaryExpression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.apache.activemq.filter;

import javax.jms.JMSException;
import jakarta.jms.JMSException;

/** A BooleanExpression is an expression that always produces a Boolean result. */
public interface BooleanExpression extends Expression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public BooleanFunctionCallExpr(String func_name, List<Expression> args)
* @param message_ctx - message context against which the expression will be evaluated.
* @return the boolean evaluation of the function call expression.
*/
public boolean matches(MessageEvaluationContext message_ctx) throws javax.jms.JMSException {
public boolean matches(MessageEvaluationContext message_ctx) throws jakarta.jms.JMSException {
Boolean result;

result = (Boolean) evaluate(message_ctx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import javax.jms.JMSException;

/** A filter performing a comparison of two objects */
public abstract class ComparisonExpression extends BinaryExpression implements BooleanExpression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.math.BigDecimal;
import javax.jms.JMSException;

/** Represents a constant expression */
public class ConstantExpression implements Expression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.io.IOException;
import javax.jms.JMSException;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.util.JMSExceptionSupport;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.util.ArrayList;
import java.util.List;
import javax.jms.JMSException;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.Message;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.apache.activemq.filter;

import javax.jms.JMSException;
import jakarta.jms.JMSException;

/** Represents an expression */
public interface Expression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public Expression getArgument(int which) {
*
* @see Expression#evaluate
*/
public Object evaluate(MessageEvaluationContext message_ctx) throws javax.jms.JMSException {
public Object evaluate(MessageEvaluationContext message_ctx) throws jakarta.jms.JMSException {
return this.filterFunc.evaluate(this, message_ctx);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.util.ArrayList;
import java.util.List;
import javax.jms.JMSException;

/** A sequence of expressions, to be combined with OR or AND conjunctions. */
public abstract class LogicExpression implements BooleanExpression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.jms.JMSException;

/**
* A MultiExpressionEvaluator is used to evaluate multiple expressions in single method call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.io.IOException;
import javax.jms.JMSException;
import org.apache.activemq.util.JMSExceptionSupport;

public class NoLocalExpression implements BooleanExpression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import javax.jms.JMSException;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.Message;
import org.apache.activemq.command.TransactionId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import javax.jms.JMSException;

/** An expression which performs an operation on two expression values */
public abstract class UnaryExpression implements Expression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package org.apache.activemq.filter;

import jakarta.jms.JMSException;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import javax.jms.JMSException;
import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.apache.activemq.filter;

import javax.jms.JMSException;
import jakarta.jms.JMSException;

/** Used to evaluate an XQuery Expression in a JMS selector. */
public final class XQueryExpression implements BooleanExpression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ public interface FilterFunction {
* @param message - the context within which to evaluate the call.
*/
public Object evaluate(FunctionCallExpression expr, MessageEvaluationContext message)
throws javax.jms.JMSException;
throws jakarta.jms.JMSException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public boolean returnsBoolean(FunctionCallExpression expr) {
* @return Boolean - the result of the evaluation.
*/
public Object evaluate(FunctionCallExpression expr, MessageEvaluationContext message_ctx)
throws javax.jms.JMSException {
throws jakarta.jms.JMSException {
java.util.List arr;
int cur;
Object cand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public boolean returnsBoolean(FunctionCallExpression expr) {
* @return java.util.List - the result of the evaluation.
*/
public Object evaluate(FunctionCallExpression expr, MessageEvaluationContext message)
throws javax.jms.JMSException {
throws jakarta.jms.JMSException {
java.util.ArrayList ele_arr;
int num_arg;
int cur;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public boolean returnsBoolean(FunctionCallExpression expr) {
* @return true - if the value matches the regular expression; false - otherwise.
*/
public Object evaluate(FunctionCallExpression expr, MessageEvaluationContext message)
throws javax.jms.JMSException {
throws jakarta.jms.JMSException {
Object reg;
Object cand;
String reg_str;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public boolean returnsBoolean(FunctionCallExpression expr) {
* @return String - the result of the replacement.
*/
public Object evaluate(FunctionCallExpression expr, MessageEvaluationContext message_ctx)
throws javax.jms.JMSException {
throws jakarta.jms.JMSException {
String src;
String match_regex;
String repl_lit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public boolean returnsBoolean(FunctionCallExpression expr) {
* @return List - a list of Strings resulting from the split.
*/
public Object evaluate(FunctionCallExpression expr, MessageEvaluationContext message_ctx)
throws javax.jms.JMSException {
throws jakarta.jms.JMSException {
String src;
String split_pat;
String[] result;
Expand Down
6 changes: 3 additions & 3 deletions examples/payara-micro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>8.0.0</version>
<version>9.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>3.2</version>
<version>6.1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
Expand All @@ -51,7 +51,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>3.0.1</version>
<version>3.2.1</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@
import static com.datastax.oss.pulsar.examples.ReceiveMessageFromTopic.countQueue;
import static com.datastax.oss.pulsar.examples.ReceiveMessageFromTopic.countTopic;

import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
import jakarta.ejb.ActivationConfigProperty;
import jakarta.ejb.MessageDriven;
import jakarta.jms.Message;
import jakarta.jms.MessageListener;

@MessageDriven(
name = "testmdbqueue",
activationConfig = {
@ActivationConfigProperty(propertyName = "resourceAdapter", propertyValue = "pulsarra"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(
propertyName = "destinationType",
propertyValue = "jakarta.jms.Queue"
),
@ActivationConfigProperty(
propertyName = "destination",
propertyValue = "${MPCONFIG=queue.name}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@
*/
package com.datastax.oss.pulsar.examples;

import jakarta.ejb.ActivationConfigProperty;
import jakarta.ejb.MessageDriven;
import jakarta.jms.Message;
import jakarta.jms.MessageListener;
import java.util.concurrent.atomic.AtomicInteger;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;

@MessageDriven(
name = "testmdbtopic",
activationConfig = {
@ActivationConfigProperty(propertyName = "resourceAdapter", propertyValue = "pulsarra"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(
propertyName = "destinationType",
propertyValue = "jakarta.jms.Topic"
),
@ActivationConfigProperty(propertyName = "subscriptionType", propertyValue = "Durable"),
@ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "mysub"),
@ActivationConfigProperty(propertyName = "subscriptionMode", propertyValue = "Shared"),
Expand Down
Loading
Loading