Class WorkManagerFactoryImpl

  • All Implemented Interfaces:
    WorkManagerFactory

    @Service
    @Singleton
    public final class WorkManagerFactoryImpl
    extends Object
    implements WorkManagerFactory
    WorkManagerFactoryImpl allows other customized WorkManager implementation to be plugged into the server. The name of the customized implementation class for the WorkManager has to be specified as a system property "workmanager.class".

    It is assumed that the implementation for WorkManager also provides a public method called "getInstance" that returns a WorkManager object. This frees the WorkManagerFactoryImpl from deciding whether WorkManager is implemented as a Singleton in the server.

    Author:
    Qingqing Ouyang, Binod P.G.
    • Constructor Detail

      • WorkManagerFactoryImpl

        public WorkManagerFactoryImpl()
    • Method Detail

      • createWorkManager

        public jakarta.resource.spi.work.WorkManager createWorkManager​(String poolName,
                                                                       String raName,
                                                                       ClassLoader rarCL)
        This is called by the constructor of BootstrapContextImpl
        Specified by:
        createWorkManager in interface WorkManagerFactory
        Parameters:
        poolName - thread pool name
        raName - resource-adapter-name
        Returns:
        WorkManager work manager that can be used by resource-adapter
      • removeWorkManager

        public boolean removeWorkManager​(String moduleName)
        remove the actual work manager from registry
        Specified by:
        removeWorkManager in interface WorkManagerFactory
        Parameters:
        moduleName - resource-adapter name
        Returns:
        boolean