diff --git a/api/src/main/java/jakarta/enterprise/concurrent/ManageableThread.java b/api/src/main/java/jakarta/enterprise/concurrent/ManageableThread.java index 26aba8ca..dffb6bbb 100644 --- a/api/src/main/java/jakarta/enterprise/concurrent/ManageableThread.java +++ b/api/src/main/java/jakarta/enterprise/concurrent/ManageableThread.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -18,9 +18,10 @@ /** * - * Interface to be implemented by the Jakarta™ EE product providers on threads - * that are created by calling + * Interface to be implemented by the Jakarta™ EE product providers + * on platform threads that are created by calling * {@link ManagedThreadFactory#newThread(java.lang.Runnable) }. + * Virtual threads do not implement {@code ManageableThread}. * * @since 1.0 */ diff --git a/api/src/main/java/jakarta/enterprise/concurrent/ManagedThreadFactory.java b/api/src/main/java/jakarta/enterprise/concurrent/ManagedThreadFactory.java index 416a2301..313cfcdb 100644 --- a/api/src/main/java/jakarta/enterprise/concurrent/ManagedThreadFactory.java +++ b/api/src/main/java/jakarta/enterprise/concurrent/ManagedThreadFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -34,8 +34,9 @@ * Component Provider and Deployer identify these requirements and map the * resource environment reference appropriately.
* - * Threads returned from the {@code newThread()} method should implement the - * {@link ManageableThread} interface. + * Platform threads returned from the {@code newThread()} method should implement the + * {@link ManageableThread} interface. Virtual threads do not implement + * {@code ManageableThread}. * * The Runnable task that is allocated to the new thread using the * {@link ThreadFactory#newThread(Runnable)} method diff --git a/api/src/main/java/jakarta/enterprise/concurrent/ManagedThreadFactoryDefinition.java b/api/src/main/java/jakarta/enterprise/concurrent/ManagedThreadFactoryDefinition.java index a8aa321b..a0efa335 100644 --- a/api/src/main/java/jakarta/enterprise/concurrent/ManagedThreadFactoryDefinition.java +++ b/api/src/main/java/jakarta/enterprise/concurrent/ManagedThreadFactoryDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021,2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -159,7 +159,9 @@ String context() default "java:comp/DefaultContextService"; /** - *
Priority for threads created by this thread factory.
+ *Priority for platform threads created by this thread factory. + * Virtual threads always have the priority {@link java.lang.Thread#NORM_PRIORITY} + * regardless of this setting.
* *The default is {@link java.lang.Thread#NORM_PRIORITY}.
* diff --git a/specification/src/main/asciidoc/jakarta-concurrency.adoc b/specification/src/main/asciidoc/jakarta-concurrency.adoc index 2cc40028..9a64f1ca 100644 --- a/specification/src/main/asciidoc/jakarta-concurrency.adoc +++ b/specification/src/main/asciidoc/jakarta-concurrency.adoc @@ -1,7 +1,7 @@ :sectnums: = Jakarta Concurrency Specification, Version 3.1 -Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. @@ -2164,8 +2164,8 @@ attributes. See EE.5.8.2 for details. The Jakarta EE Product Provider’s responsibilities are as defined in EE.5.8.3 and must support the following: -* Threads returned by the `newThread()` method must implement the -`ManageableThread` interface. +* Platform threads returned by the `newThread()` method must implement the +`ManageableThread` interface. Virtual threads do not implement `ManageableThread`. * When a `ManagedThreadFactory` instance is stopped, such as when the component that created it is stopped or when the application server is shutting down, all threads that it has created using the `newThread()`