Class WorkManagerThreadPool

java.lang.Object
org.apache.cxf.jca.cxf.CXFWorkAdapter
org.apache.cxf.jca.cxf.WorkManagerThreadPool
All Implemented Interfaces:
jakarta.resource.spi.work.WorkListener, Executor, EventListener, org.eclipse.jetty.util.thread.ThreadPool

public class WorkManagerThreadPool extends CXFWorkAdapter implements org.eclipse.jetty.util.thread.ThreadPool
The adapter for using Application Server's thread pool. Just simply override the dispatch method.
  • Constructor Details

    • WorkManagerThreadPool

      public WorkManagerThreadPool(jakarta.resource.spi.work.WorkManager wm)
  • Method Details

    • dispatch

      public boolean dispatch(Runnable job)
    • getIdleThreads

      public int getIdleThreads()
      Specified by:
      getIdleThreads in interface org.eclipse.jetty.util.thread.ThreadPool
    • getThreads

      public int getThreads()
      Specified by:
      getThreads in interface org.eclipse.jetty.util.thread.ThreadPool
    • isLowOnThreads

      public boolean isLowOnThreads()
      Specified by:
      isLowOnThreads in interface org.eclipse.jetty.util.thread.ThreadPool
    • join

      public void join() throws InterruptedException
      Specified by:
      join in interface org.eclipse.jetty.util.thread.ThreadPool
      Throws:
      InterruptedException
    • workRejected

      public void workRejected(jakarta.resource.spi.work.WorkEvent e)
      Specified by:
      workRejected in interface jakarta.resource.spi.work.WorkListener
      Overrides:
      workRejected in class CXFWorkAdapter
    • execute

      public void execute(Runnable command)
      Specified by:
      execute in interface Executor