Class ManagedExecutorDefinitionServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
ee.jakarta.tck.concurrent.framework.TestServlet
ee.jakarta.tck.concurrent.spec.ManagedExecutorService.resourcedef.ManagedExecutorDefinitionServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

@WebServlet("/ManagedExecutorDefinitionServlet") public class ManagedExecutorDefinitionServlet extends TestServlet
See Also:
  • Constructor Details

    • ManagedExecutorDefinitionServlet

      public ManagedExecutorDefinitionServlet()
  • Method Details

    • testAsyncCompletionStage

      public void testAsyncCompletionStage() throws Throwable
      ManagedExecutorService 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 ManagedExecutorDefinition config.
      Throws:
      Throwable
    • testAsynchronousMethodReturnsCompletableFuture

      public void testAsynchronousMethodReturnsCompletableFuture() throws Exception
      Asynchronous method that returns CompletableFuture runs asynchronously and can run successfully to completion or be signaled to end prematurely (if so implemented) by completing its CompletableFuture.
      Throws:
      Exception
    • testAsynchronousMethodReturnsCompletionStage

      public void testAsynchronousMethodReturnsCompletionStage() throws Exception
      Asynchronous method that returns a CompletionStage runs asynchronously on the specified executor.
      Throws:
      Exception
    • testAsynchronousMethodVoidReturnType

      public void testAsynchronousMethodVoidReturnType() throws Exception
      Asynchronous method with no return type (void) runs asynchronously.
      Throws:
      Exception
    • testCompletedFuture

      public void testCompletedFuture() throws Throwable
      ManagedExecutorService 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 ManagedExecutorDefinition config.
      Throws:
      Throwable
    • testCopyCompletableFuture

      public void testCopyCompletableFuture() throws Throwable
      ManagedExecutorService can create a contextualized copy of an unmanaged CompletableFuture.
      Throws:
      Throwable
    • testIncompleteFuture

      public void testIncompleteFuture() throws Throwable
      ManagedExecutorService 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 ManagedExecutorDefinition config.
      Throws:
      Throwable
    • testManagedExecutorDefinitionAllAttributes

      public void testManagedExecutorDefinitionAllAttributes() throws Throwable
      A ManagedExecutorDefinition with all attributes configured enforces maxAsync and propagates context.
      Throws:
      Throwable
    • testManagedExecutorDefinitionDefaults

      public void testManagedExecutorDefinitionDefaults() throws Throwable
      A ManagedExecutorDefinition with minimal attributes can run multiple async tasks concurrently and uses java:comp/DefaultContextService to determine context propagation and clearing.
      Throws:
      Throwable
    • 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()