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

Fix errors with asciidoc section headers #427

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions specification/src/main/asciidoc/jakarta-concurrency.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2437,7 +2437,9 @@ provides a way for applying empty/cleared context of that type to threads,
and provides a way to restore the previous thread context after a
contextual task or action completes.

===== Third-Party Context Provider’s Requirements
=== Responsibilities and Requirements

==== Third-Party Context Provider’s Requirements

This subsection describes the requirements of a third-party provider
of thread context.
Expand All @@ -2458,7 +2460,7 @@ upon request from the Jakarta EE Product Provider.
thread, restoring the previous thread context, upon request from the
Jakarta EE Product Provider.

===== Jakarta EE Product Provider’s Requirements
==== Jakarta EE Product Provider’s Requirements

This subsection describes the requirements of the Jakarta EE Product
Provider.
Expand All @@ -2482,7 +2484,9 @@ on a thread that will run the contextual task or action.
. Invoke the `ThreadContextRestorer.endContext` method to restore the
previous context after the contextual task or action completes.

===== Usage Example
=== Usage Examples

==== Custom Thread Context Example

This example supplies a `ThreadContextProvider` that turns priority
(from `java.lang.Thread`) into a third-party context type.
Expand All @@ -2493,7 +2497,7 @@ and already built into Java, allowing the reader to focus on the
mechanisms of thread context capture/propagation/restore rather than the
details of the context type itself.

====== Example of Custom ThreadContextProvider
===== Example of Custom ThreadContextProvider

The interface, `jakarta.enterprise.concurrent.spi.ThreadContextProvider`,
is the means by which the Jakarta EE Product Provider requests the
Expand Down Expand Up @@ -2525,7 +2529,7 @@ public class ThreadPriorityContextProvider implements ThreadContextProvider {
}
----

====== Example of Custom ThreadContextSnapshot and ThreadContextRestorer
===== Example of Custom ThreadContextSnapshot and ThreadContextRestorer

The interface, `jakarta.enterprise.concurrent.spi.ThreadContextSnapshot`,
represents a snapshot of thread context. The Jakarta EE Product Provider
Expand Down Expand Up @@ -2571,7 +2575,7 @@ public class ThreadPrioritySnapshot implements ThreadContextSnapshot {
}
----

====== ServiceLoader Entry
===== ServiceLoader Entry

To make the `ThreadContextProvider` implementation available to the
`ServiceLoader`, the provider JAR includes a file of the following name
Expand All @@ -2589,7 +2593,7 @@ which contains the following line,
example.jakarta.concurrency.priority.ThreadPriorityContextProvider
----

====== Usage of the Custom Context Type from a Servlet
===== Usage of the Custom Context Type from a Servlet

The following example shows application code that uses a
`ManagedExecutorService` that propagates the example context type.
Expand Down Expand Up @@ -2650,7 +2654,7 @@ Application code, including from within the asynchronous method, can query
the status of the completable future instance and can choose to complete
it at any time and by any means.

==== Scheduled Asynchronous Methods
=== Scheduled Asynchronous Methods

The `runAt` attribute of `Asynchronous` allows schedules to be assigned
to asynchronous methods, such that the
Expand All @@ -2661,6 +2665,8 @@ needed by returning a `null` result value. The Jakarta EE Product attempts
to run the method at its scheduled times until its future is completed
or the method returns a non-null result value or raises an exception.

=== Responsibilities and Requirements

==== Application Component Provider’s Responsibilities

Application Component Providers (application developers) (EE2.12.2)
Expand Down Expand Up @@ -2779,7 +2785,7 @@ for any reason after this point, it completes the
`java.util.concurrent.CompletableFuture` instance with a
`java.util.concurrent.CancellationException`.

==== Transaction Management
=== Transaction Management

When an asynchronous method is also annotated with
`jakarta.transaction.Transactional`, the transactional types which can be
Expand Down