Package com.sun.enterprise.connectors
Class BootstrapContextImpl
- java.lang.Object
-
- com.sun.enterprise.connectors.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
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_INSTANCE_LENGTH
-
Constructor Summary
Constructors Constructor Description BootstrapContextImpl(String moduleName)
Constructs aBootstrapContext
with default thread pool for work manager.BootstrapContextImpl(String poolId, String moduleName, ClassLoader rarCL)
Constructs aBootstrapContext
with a specified thread pool for work manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Timer
createTimer()
Creates ajava.util.Timer
instance.jakarta.transaction.TransactionSynchronizationRegistry
getTransactionSynchronizationRegistry()
jakarta.resource.spi.work.WorkManager
getWorkManager()
Retrieves the work manager.jakarta.resource.spi.XATerminator
getXATerminator()
Retrieves theXATerminator
object.boolean
isContextSupported(Class<? extends jakarta.resource.spi.work.WorkContext> aClass)
-
-
-
Field Detail
-
MAX_INSTANCE_LENGTH
public static final int MAX_INSTANCE_LENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BootstrapContextImpl
public BootstrapContextImpl(String moduleName) throws ConnectorRuntimeException
Constructs aBootstrapContext
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 aBootstrapContext
with a specified thread pool for work manager.- Parameters:
poolId
- thread-pool-idmoduleName
- resource-adapter name- Throws:
ConnectorRuntimeException
- If there is a failure in retrieving WorkManager.
-
-
Method Detail
-
createTimer
public Timer createTimer()
Creates ajava.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 interfacejakarta.resource.spi.BootstrapContext
- Returns:
java.util.Timer
object.
-
isContextSupported
public boolean isContextSupported(Class<? extends jakarta.resource.spi.work.WorkContext> aClass)
- Specified by:
isContextSupported
in interfacejakarta.resource.spi.BootstrapContext
-
getTransactionSynchronizationRegistry
public jakarta.transaction.TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
- Specified by:
getTransactionSynchronizationRegistry
in interfacejakarta.resource.spi.BootstrapContext
-
getWorkManager
public jakarta.resource.spi.work.WorkManager getWorkManager()
Retrieves the work manager.- Specified by:
getWorkManager
in interfacejakarta.resource.spi.BootstrapContext
- Returns:
WorkManager
instance.- See Also:
CommonWorkManager
,WorkManagerFactoryImpl
-
getXATerminator
public jakarta.resource.spi.XATerminator getXATerminator()
Retrieves theXATerminator
object.- Specified by:
getXATerminator
in interfacejakarta.resource.spi.BootstrapContext
-
-