Class BootstrapContextImpl

  • All Implemented Interfaces:
    jakarta.resource.spi.BootstrapContext, Serializable

    public final class BootstrapContextImpl
    extends Object
    implements jakarta.resource.spi.BootstrapContext, Serializable
    BootstrapContext implementation.
    Author:
    Qingqing Ouyang, Binod P.G
    See Also:
    Serialized Form
    • Constructor Detail

      • BootstrapContextImpl

        public BootstrapContextImpl​(String moduleName)
                             throws ConnectorRuntimeException
        Constructs a BootstrapContext with default thread pool for work manager.
        Parameters:
        moduleName - resource-adapter name
        Throws:
        ConnectorRuntimeException - If there is a failure in retrieving WorkManager.
      • BootstrapContextImpl

        public BootstrapContextImpl​(String poolId,
                                    String moduleName,
                                    ClassLoader rarCL)
                             throws ConnectorRuntimeException
        Constructs a BootstrapContext with a specified thread pool for work manager.
        Parameters:
        poolId - thread-pool-id
        moduleName - resource-adapter name
        Throws:
        ConnectorRuntimeException - If there is a failure in retrieving WorkManager.
    • Method Detail

      • createTimer

        public Timer createTimer()
        Creates a java.util.Timer instance. This can cause a problem, since the timer threads are not actually under appserver control. We should override the timer later.
        Specified by:
        createTimer in interface jakarta.resource.spi.BootstrapContext
        Returns:
        java.util.Timer object.
      • isContextSupported

        public boolean isContextSupported​(Class<? extends jakarta.resource.spi.work.WorkContext> aClass)
        Specified by:
        isContextSupported in interface jakarta.resource.spi.BootstrapContext
      • getTransactionSynchronizationRegistry

        public jakarta.transaction.TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
        Specified by:
        getTransactionSynchronizationRegistry in interface jakarta.resource.spi.BootstrapContext
      • getWorkManager

        public jakarta.resource.spi.work.WorkManager getWorkManager()
        Retrieves the work manager.
        Specified by:
        getWorkManager in interface jakarta.resource.spi.BootstrapContext
        Returns:
        WorkManager instance.
        See Also:
        CommonWorkManager, WorkManagerFactoryImpl
      • getXATerminator

        public jakarta.resource.spi.XATerminator getXATerminator()
        Retrieves the XATerminator object.
        Specified by:
        getXATerminator in interface jakarta.resource.spi.BootstrapContext