Skip to content

Commit

Permalink
update to MicroProfile Context Propagation 1.3
Browse files Browse the repository at this point in the history
This includes the move from Jakarta EE 8 (javax.*) to 9 (jakarta.*).
  • Loading branch information
Ladicek committed Jan 6, 2022
1 parent 70fc794 commit c8cc8f7
Show file tree
Hide file tree
Showing 29 changed files with 155 additions and 133 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.AnnotationLiteral;
import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;
import jakarta.enterprise.util.AnnotationLiteral;
import jakarta.enterprise.util.Nonbinding;
import jakarta.interceptor.InterceptorBinding;

import org.eclipse.microprofile.context.ThreadContext;

Expand Down Expand Up @@ -75,7 +75,7 @@
*
* <p>
* A <code>CurrentThreadContext</code> must fail to initialise, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup,
* if a context type specified within this set is unavailable
* or if the {@link #propagated} and/or {@link #unchanged} set
Expand Down Expand Up @@ -116,7 +116,7 @@
*
* <p>
* A <code>CurrentThreadContext</code> must fail to initialise, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup,
* if a context type specified within this set is unavailable
* or if the {@link #cleared} and/or {@link #unchanged} set
Expand Down Expand Up @@ -171,7 +171,7 @@
*
* <p>
* A <code>CurrentThreadContext</code> must fail to initialise, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup,
* if a context type specified within this set is unavailable
* or if the {@link #cleared} and/or {@link #propagated} set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.AnnotationLiteral;
import jakarta.enterprise.util.AnnotationLiteral;

import org.eclipse.microprofile.context.ManagedExecutor;
import org.eclipse.microprofile.context.ThreadContext;
Expand Down Expand Up @@ -82,7 +82,7 @@
*
* <p>
* A <code>ManagedExecutor</code> will fail to inject, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException} on application startup,
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException} on application startup,
* if multiple injection points are annotated to create instances with the same name.
* </p>
*
Expand Down Expand Up @@ -117,7 +117,7 @@
*
* <p>
* A <code>ManagedExecutor</code> must fail to inject, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup,
* if a context type specified within this set is unavailable
* or if the {@link #propagated} set includes one or more of the
Expand Down Expand Up @@ -157,7 +157,7 @@
*
* <p>
* A <code>ManagedExecutor</code> must fail to inject, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup,
* if a context type specified within this set is unavailable
* or if the {@link #cleared} set includes one or more of the
Expand All @@ -183,7 +183,7 @@
*
* <p>
* A <code>ManagedExecutor</code> must fail to inject, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup, if the
* <code>maxAsync</code> value is 0 or less than -1.
*
Expand All @@ -205,7 +205,7 @@
*
* <p>
* A <code>ManagedExecutor</code> must fail to inject, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup, if the
* <code>maxQueued</code> value is 0 or less than -1.
*
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/io/smallrye/context/api/NamedInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.AnnotationLiteral;
import javax.inject.Qualifier;
import jakarta.enterprise.util.AnnotationLiteral;
import jakarta.inject.Qualifier;

import org.eclipse.microprofile.context.ManagedExecutor;
import org.eclipse.microprofile.context.ThreadContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.AnnotationLiteral;
import jakarta.enterprise.util.AnnotationLiteral;

import org.eclipse.microprofile.context.ThreadContext;

Expand Down Expand Up @@ -74,14 +74,14 @@
*
* <p>
* A <code>ThreadContext</code> will fail to inject, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup,
* if multiple injection points are annotated to create instances with the same name.
* </p>
*
* <p>
* A <code>ThreadContext</code> must fail to inject, raising
* {@link javax.enterprise.inject.spi.DeploymentException DeploymentException}
* {@link jakarta.enterprise.inject.spi.DeploymentException DeploymentException}
* on application startup, if more than one provider provides the same thread context
* {@link org.eclipse.microprofile.context.spi.ThreadContextProvider#getThreadContextType type}.
*
Expand Down Expand Up @@ -116,7 +116,7 @@
*
* <p>
* A <code>ThreadContext</code> must fail to inject, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup,
* if a context type specified within this set is unavailable
* or if the {@link #propagated} and/or {@link #unchanged} set
Expand Down Expand Up @@ -156,7 +156,7 @@
*
* <p>
* A <code>ThreadContext</code> must fail to inject, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup,
* if a context type specified within this set is unavailable
* or if the {@link #cleared} and/or {@link #unchanged} set
Expand Down Expand Up @@ -209,7 +209,7 @@
*
* <p>
* A <code>ThreadContext</code> must fail to inject, raising
* {@link javax.enterprise.inject.spi.DefinitionException DefinitionException}
* {@link jakarta.enterprise.inject.spi.DefinitionException DefinitionException}
* on application startup,
* if a context type specified within this set is unavailable
* or if the {@link #cleared} and/or {@link #propagated} set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import java.util.Map;
import java.util.Set;

import javax.enterprise.context.ConversationScoped;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.spi.CDI;
import jakarta.enterprise.context.ConversationScoped;
import jakarta.enterprise.context.RequestScoped;
import jakarta.enterprise.context.SessionScoped;
import jakarta.enterprise.inject.spi.CDI;

import org.eclipse.microprofile.context.ThreadContext;
import org.eclipse.microprofile.context.spi.ThreadContextController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@
import java.util.Set;
import java.util.stream.Collectors;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Any;
import javax.enterprise.inject.Default;
import javax.enterprise.inject.Instance;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
import javax.enterprise.inject.spi.AfterDeploymentValidation;
import javax.enterprise.inject.spi.Annotated;
import javax.enterprise.inject.spi.AnnotatedParameter;
import javax.enterprise.inject.spi.BeforeBeanDiscovery;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.ProcessInjectionPoint;
import javax.enterprise.inject.spi.ProcessProducer;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.event.Observes;
import jakarta.enterprise.inject.Any;
import jakarta.enterprise.inject.Default;
import jakarta.enterprise.inject.Instance;
import jakarta.enterprise.inject.spi.AfterBeanDiscovery;
import jakarta.enterprise.inject.spi.AfterDeploymentValidation;
import jakarta.enterprise.inject.spi.Annotated;
import jakarta.enterprise.inject.spi.AnnotatedParameter;
import jakarta.enterprise.inject.spi.BeforeBeanDiscovery;
import jakarta.enterprise.inject.spi.Extension;
import jakarta.enterprise.inject.spi.InjectionPoint;
import jakarta.enterprise.inject.spi.ProcessInjectionPoint;
import jakarta.enterprise.inject.spi.ProcessProducer;

import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import java.util.Collection;

import javax.annotation.Priority;
import javax.interceptor.AroundInvoke;
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
import jakarta.annotation.Priority;
import jakarta.interceptor.AroundInvoke;
import jakarta.interceptor.Interceptor;
import jakarta.interceptor.InvocationContext;

import org.eclipse.microprofile.context.ThreadContext;

Expand Down
6 changes: 3 additions & 3 deletions jta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>${version.jta}</version>
</dependency>
<dependency>
Expand All @@ -37,7 +37,7 @@
</dependency>
<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta</artifactId>
<artifactId>narayana-jta-jakarta</artifactId>
<version>${version.narayana}</version>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.annotation.PreDestroy;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.CreationException;
import javax.enterprise.inject.Instance;
import javax.enterprise.inject.spi.CDI;
import javax.transaction.InvalidTransactionException;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import jakarta.annotation.PreDestroy;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.CreationException;
import jakarta.enterprise.inject.Instance;
import jakarta.enterprise.inject.spi.CDI;
import jakarta.transaction.InvalidTransactionException;
import jakarta.transaction.SystemException;
import jakarta.transaction.Transaction;
import jakarta.transaction.TransactionManager;

import org.eclipse.microprofile.context.ThreadContext;
import org.eclipse.microprofile.context.spi.ThreadContextProvider;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.smallrye.context.inject;

import javax.transaction.RollbackException;
import javax.transaction.Status;
import javax.transaction.Synchronization;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import javax.transaction.UserTransaction;
import jakarta.transaction.RollbackException;
import jakarta.transaction.Status;
import jakarta.transaction.Synchronization;
import jakarta.transaction.SystemException;
import jakarta.transaction.Transaction;
import jakarta.transaction.TransactionManager;
import jakarta.transaction.UserTransaction;

import org.jboss.weld.transaction.spi.TransactionServices;

Expand Down
41 changes: 30 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

<parent>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-parent</artifactId>
<version>32</version>
<artifactId>smallrye-jakarta-parent</artifactId>
<version>34</version>
</parent>

<artifactId>smallrye-context-propagation-parent</artifactId>
Expand Down Expand Up @@ -37,22 +37,24 @@
</scm>

<properties>
<version.microprofile.context-propagation>1.2</version.microprofile.context-propagation>
<version.microprofile.config>2.0</version.microprofile.config>
<version.smallrye.config>2.5.0</version.smallrye.config>
<version.microprofile.context-propagation>1.3</version.microprofile.context-propagation>
<version.microprofile.config>3.0.1</version.microprofile.config>
<version.smallrye.config>3.0.0-RC1</version.smallrye.config>
<version.jboss.threads>3.4.2.Final</version.jboss.threads>
<version.jta>1.3</version.jta>
<version.narayana>5.12.1.Final</version.narayana>
<version.jta>2.0.0</version.jta>
<version.narayana>5.12.4.Final</version.narayana>
<version.rxjava2>2.2.21</version.rxjava2>
<version.rxjava1>1.3.8</version.rxjava1>
<version.weld-api>4.0.SP1</version.weld-api>
<version.weld-core>4.0.2.Final</version.weld-core>

<!-- Testing versions -->
<version.smallrye.common>1.8.0</version.smallrye.common>
<version.smallrye.common>2.0.0-RC1</version.smallrye.common>
<version.jnpserver>5.0.5.Final</version.jnpserver>
<version.resteasy>4.6.0.Final</version.resteasy>
<version.hibernate>5.6.0.Final</version.hibernate>
<version.resteasy>6.0.0.Beta1</version.resteasy>
<version.hibernate>5.6.2.Final</version.hibernate>
<version.hsqldb>2.5.0</version.hsqldb>
<version.vertx>4.1.5</version.vertx>
<version.vertx>4.2.3</version.vertx>
<version.hamcrest>2.2</version.hamcrest>

<maven.javadoc.failOnWarnings>true</maven.javadoc.failOnWarnings>
Expand Down Expand Up @@ -93,6 +95,23 @@
<artifactId>rxjava</artifactId>
<version>${version.rxjava1}</version>
</dependency>

<!-- TODO SmallRye Parent 34 manages Weld to an older version that doesn't have JBoss Class File Writer 1.2.5.Final -->
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-spi</artifactId>
<version>${version.weld-api}</version>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
<version>${version.weld-api}</version>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-impl</artifactId>
<version>${version.weld-core}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
2 changes: 1 addition & 1 deletion tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
</dependency>
<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta</artifactId>
<artifactId>narayana-jta-jakarta</artifactId>
<version>${version.narayana}</version>
<exclusions>
<exclusion>
Expand Down
Loading

0 comments on commit c8cc8f7

Please sign in to comment.