Package org.springframework.jca.support

# Class SimpleBootstrapContext

java.lang.Object
org.springframework.jca.support.SimpleBootstrapContext

All Implemented Interfaces:
  `BootstrapContext`

public class SimpleBootstrapContext extends Object implements BootstrapContext
Simple implementation of the JCA 1.7 `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`.

Since:
  2.0.3
Author:
  Juergen Hoeller
See Also:
  - `ResourceAdapter.start(jakarta.resource.spi.BootstrapContext)`
  - `ResourceAdapterFactoryBean`

## Constructor Summary

Constructors
Constructor
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.

## Method Summary

Modifier and Type
Method
Description
`Timer`
`createTimer()`
`TransactionSynchronizationRegistry`
`getTransactionSynchronizationRegistry()`
`WorkManager`
`getWorkManager()`
`XATerminator`
`getXATerminator()`
`boolean`
`isContextSupported(Class<? extends WorkContext> workContextClass)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SimpleBootstrapContext

public SimpleBootstrapContext(@Nullable WorkManager workManager)
Create a new SimpleBootstrapContext for the given WorkManager, with no XATerminator available.

Parameters:
  `workManager` - the JCA WorkManager to use (may be `null`)

### SimpleBootstrapContext

public SimpleBootstrapContext(@Nullable WorkManager workManager, @Nullable XATerminator xaTerminator)
Create a new SimpleBootstrapContext for the given WorkManager and XATerminator.

Parameters:
  `workManager` - the JCA WorkManager to use (may be `null`)
  `xaTerminator` - the JCA XATerminator to use (may be `null`)

### SimpleBootstrapContext

public SimpleBootstrapContext(@Nullable WorkManager workManager, @Nullable XATerminator xaTerminator, @Nullable TransactionSynchronizationRegistry transactionSynchronizationRegistry)
Create a new SimpleBootstrapContext for the given WorkManager, XATerminator and TransactionSynchronizationRegistry.

Parameters:
  `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`)
Since:
  5.0

## Method Details

### getWorkManager

public WorkManager getWorkManager()

Specified by:
  `getWorkManager` in interface `BootstrapContext`

### getXATerminator

@Nullable public XATerminator getXATerminator()

Specified by:
  `getXATerminator` in interface `BootstrapContext`

### createTimer

public Timer createTimer() throws UnavailableException

Specified by:
  `createTimer` in interface `BootstrapContext`
Throws:
  `UnavailableException`

### isContextSupported

public boolean isContextSupported(Class<? extends WorkContext> workContextClass)

Specified by:
  `isContextSupported` in interface `BootstrapContext`

### getTransactionSynchronizationRegistry

@Nullable public TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()

Specified by:
  `getTransactionSynchronizationRegistry` in interface `BootstrapContext`