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:
  • Constructor Details

    • ManagedScheduledExecutorDefinitionServlet

      public ManagedScheduledExecutorDefinitionServlet()
  • Method Details

    • testAsyncCompletionStageMSE

      public void testAsyncCompletionStageMSE() throws Throwable
      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

      public void testAsynchronousMethodRunsWithContext() throws Throwable
      Asynchronous method runs with thread context captured from the caller.
      Throws:
      Throwable
    • testAsynchronousMethodWithMaxAsync3

      public void testAsynchronousMethodWithMaxAsync3() throws Exception
      Asynchronous method execution is constrained by executor's maxAsync, which for ScheduledExecutorA is 3.
      Throws:
      Exception
    • testCompletedFutureMSE

      public void testCompletedFutureMSE() throws Throwable
      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

      public void testIncompleteFutureMSE() throws Throwable
      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

      public void testManagedScheduledExecutorDefinitionAllAttributes() throws Throwable
      A ManagedScheduledExecutorDefinition with all attributes configured enforces maxAsync and propagates context.
      Throws:
      Throwable
    • testManagedScheduledExecutorDefinitionDefaults

      public void testManagedScheduledExecutorDefinitionDefaults() throws Throwable
      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

      public void testNotAnAsynchronousMethod() throws Throwable
      A method that lacks the Asynchronous annotation does not run as an asynchronous method, even if it returns a CompletableFuture.
      Throws:
      Throwable
    • testScheduleWithCronTrigger

      public void testScheduleWithCronTrigger() throws Throwable
      ManagedScheduledExecutorService can schedule a task with a CronTrigger
      Throws:
      Throwable
    • testScheduleWithZonedTrigger

      public void testScheduleWithZonedTrigger() throws Exception
      ManagedScheduledExecutorService can schedule a task with a ZonedTrigger implementation that uses the LastExecution methods with ZonedDateTime parameters.
      Throws:
      Exception
    • testScheduledAsynchCompletedFuture

      public void testScheduledAsynchCompletedFuture() throws Throwable
      Throws:
      Throwable
    • testScheduledAsynchCompletedResult

      public void testScheduledAsynchCompletedResult() throws Throwable
      Throws:
      Throwable
    • testScheduledAsynchCompletedExceptionally

      public void testScheduledAsynchCompletedExceptionally()
      Ensure completion of scheduled asynch after completing exceptionally
    • testScheduledAsynchOverlapSkipping

      public void testScheduledAsynchOverlapSkipping() throws Throwable
      Throws:
      Throwable
    • testScheduledAsynchIgnoresMaxAsync

      public void testScheduledAsynchIgnoresMaxAsync() throws Throwable
      Throws:
      Throwable
    • testScheduledAsynchWithMultipleSchedules

      public void testScheduledAsynchWithMultipleSchedules() throws Throwable
      Throws:
      Throwable
    • testScheduledAsynchWithInvalidJNDIName

      public void testScheduledAsynchWithInvalidJNDIName()
    • testScheduledAsynchVoidReturn

      public void testScheduledAsynchVoidReturn()