Class ManagedScheduledExecutorDefinitionServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
ee.jakarta.tck.concurrent.framework.TestServlet
ee.jakarta.tck.concurrent.spec.ManagedScheduledExecutorService.resourcedef.ManagedScheduledExecutorDefinitionServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
@WebServlet("/ManagedScheduledExecutorDefinitionServlet")
public class ManagedScheduledExecutorDefinitionServlet
extends TestServlet
- See Also:
-
Field Summary
Fields inherited from class ee.jakarta.tck.concurrent.framework.TestServlet
FAILURE, nl, SUCCESS, TEST_METHOD
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
ManagedScheduledExecutorService submits an action to run asynchronously as a CompletionStage.void
Asynchronous method runs with thread context captured from the caller.void
Asynchronous method execution is constrained by executor's maxAsync, which for ScheduledExecutorA is 3.void
ManagedScheduledExecutorService creates a completed CompletableFuture to which async dependent stages can be chained.void
ManagedScheduledExecutorService creates an incomplete CompletableFuture to which dependent stages can be chained.void
A ManagedScheduledExecutorDefinition with all attributes configured enforces maxAsync and propagates context.void
A ManagedScheduledExecutorDefinition with minimal attributes can run multiple async tasks concurrently and uses java:comp/DefaultContextService to determine context propagation and clearing.void
A method that lacks the Asynchronous annotation does not run as an asynchronous method, even if it returns a CompletableFuture.void
Ensure completion of scheduled asynch after completing exceptionallyvoid
void
void
void
void
void
void
void
ManagedScheduledExecutorService can schedule a task with a CronTriggervoid
ManagedScheduledExecutorService can schedule a task with a ZonedTrigger implementation that uses the LastExecution methods with ZonedDateTime parameters.Methods inherited from class ee.jakarta.tck.concurrent.framework.TestServlet
after, before, beforeClass, doGet, doPost, getResponse, invokeTest, sendPostData
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
ManagedScheduledExecutorDefinitionServlet
public ManagedScheduledExecutorDefinitionServlet()
-
-
Method Details
-
testAsyncCompletionStageMSE
ManagedScheduledExecutorService submits an action to run asynchronously as a CompletionStage. Dependent stages can be chained to the CompletionStage, and all stages run with the thread context of the thread from which they were created, per ManagedScheduledExecutorDefinition config.- Throws:
Throwable
-
testAsynchronousMethodRunsWithContext
Asynchronous method runs with thread context captured from the caller.- Throws:
Throwable
-
testAsynchronousMethodWithMaxAsync3
Asynchronous method execution is constrained by executor's maxAsync, which for ScheduledExecutorA is 3.- Throws:
Exception
-
testCompletedFutureMSE
ManagedScheduledExecutorService creates a completed CompletableFuture to which async dependent stages can be chained. The dependent stages all run with the thread context of the thread from which they were created, per ManagedScheduledExecutorDefinition config.- Throws:
Throwable
-
testIncompleteFutureMSE
ManagedScheduledExecutorService creates an incomplete CompletableFuture to which dependent stages can be chained. The CompletableFuture can be completed from another thread lacking the same context, but the dependent stages all run with the thread context of the thread from which they were created, per ManagedScheduledExecutorDefinition config.- Throws:
Throwable
-
testManagedScheduledExecutorDefinitionAllAttributes
A ManagedScheduledExecutorDefinition with all attributes configured enforces maxAsync and propagates context.- Throws:
Throwable
-
testManagedScheduledExecutorDefinitionDefaults
A ManagedScheduledExecutorDefinition with minimal attributes can run multiple async tasks concurrently and uses java:comp/DefaultContextService to determine context propagation and clearing.- Throws:
Throwable
-
testNotAnAsynchronousMethod
A method that lacks the Asynchronous annotation does not run as an asynchronous method, even if it returns a CompletableFuture.- Throws:
Throwable
-
testScheduleWithCronTrigger
ManagedScheduledExecutorService can schedule a task with a CronTrigger- Throws:
Throwable
-
testScheduleWithZonedTrigger
ManagedScheduledExecutorService can schedule a task with a ZonedTrigger implementation that uses the LastExecution methods with ZonedDateTime parameters.- Throws:
Exception
-
testScheduledAsynchCompletedFuture
- Throws:
Throwable
-
testScheduledAsynchCompletedResult
- Throws:
Throwable
-
testScheduledAsynchCompletedExceptionally
public void testScheduledAsynchCompletedExceptionally()Ensure completion of scheduled asynch after completing exceptionally -
testScheduledAsynchOverlapSkipping
- Throws:
Throwable
-
testScheduledAsynchIgnoresMaxAsync
- Throws:
Throwable
-
testScheduledAsynchWithMultipleSchedules
- Throws:
Throwable
-
testScheduledAsynchWithInvalidJNDIName
public void testScheduledAsynchWithInvalidJNDIName() -
testScheduledAsynchVoidReturn
public void testScheduledAsynchVoidReturn()
-