public class SimpleBootstrapContext extends Object implements BootstrapContext
BootstrapContext
interface, used for bootstrapping a JCA ResourceAdapter in a local environment.
Delegates to the given WorkManager and XATerminator, if any. Creates simple
local instances of java.util.Timer
.
ResourceAdapter.start(javax.resource.spi.BootstrapContext)
,
ResourceAdapterFactoryBean
Constructor and Description |
---|
SimpleBootstrapContext(WorkManager workManager)
Create a new SimpleBootstrapContext for the given WorkManager,
with no XATerminator available.
|
SimpleBootstrapContext(WorkManager workManager,
XATerminator xaTerminator)
Create a new SimpleBootstrapContext for the given WorkManager and XATerminator.
|
SimpleBootstrapContext(WorkManager workManager,
XATerminator xaTerminator,
TransactionSynchronizationRegistry transactionSynchronizationRegistry)
Create a new SimpleBootstrapContext for the given WorkManager, XATerminator
and TransactionSynchronizationRegistry.
|
Modifier and Type | Method and Description |
---|---|
Timer |
createTimer() |
TransactionSynchronizationRegistry |
getTransactionSynchronizationRegistry() |
WorkManager |
getWorkManager() |
XATerminator |
getXATerminator() |
boolean |
isContextSupported(Class<? extends WorkContext> workContextClass) |
public SimpleBootstrapContext(@Nullable WorkManager workManager)
workManager
- the JCA WorkManager to use (may be null
)public SimpleBootstrapContext(@Nullable WorkManager workManager, @Nullable XATerminator xaTerminator)
workManager
- the JCA WorkManager to use (may be null
)xaTerminator
- the JCA XATerminator to use (may be null
)public SimpleBootstrapContext(@Nullable WorkManager workManager, @Nullable XATerminator xaTerminator, @Nullable TransactionSynchronizationRegistry transactionSynchronizationRegistry)
workManager
- the JCA WorkManager to use (may be null
)xaTerminator
- the JCA XATerminator to use (may be null
)transactionSynchronizationRegistry
- the TransactionSynchronizationRegistry
to use (may be null
)public WorkManager getWorkManager()
getWorkManager
in interface BootstrapContext
@Nullable public XATerminator getXATerminator()
getXATerminator
in interface BootstrapContext
public Timer createTimer() throws UnavailableException
createTimer
in interface BootstrapContext
UnavailableException
public boolean isContextSupported(Class<? extends WorkContext> workContextClass)
isContextSupported
in interface BootstrapContext
@Nullable public TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
getTransactionSynchronizationRegistry
in interface BootstrapContext