spring-framework / org.springframework.jca.support / ResourceAdapterFactoryBean

ResourceAdapterFactoryBean

open class ResourceAdapterFactoryBean : FactoryBean<ResourceAdapter>, InitializingBean, DisposableBean

org.springframework.beans.factory.FactoryBean that bootstraps the specified JCA 1.7 javax.resource.spi.ResourceAdapter, starting it with a local javax.resource.spi.BootstrapContext and exposing it for bean references. It will also stop the ResourceAdapter on context shutdown. This corresponds to 'non-managed' bootstrap in a local environment, according to the JCA 1.7 specification.

This is essentially an adapter for bean-style bootstrapping of a JCA ResourceAdapter, allowing the BootstrapContext or its elements (such as the JCA WorkManager) to be specified through bean properties.

Author
Juergen Hoeller

Since
2.0.3

See Also
#setResourceAdapter#setBootstrapContext#setWorkManagerjavax.resource.spi.ResourceAdapter#start(javax.resource.spi.BootstrapContext)javax.resource.spi.ResourceAdapter#stop()

Constructors

<init>

ResourceAdapterFactoryBean()

org.springframework.beans.factory.FactoryBean that bootstraps the specified JCA 1.7 javax.resource.spi.ResourceAdapter, starting it with a local javax.resource.spi.BootstrapContext and exposing it for bean references. It will also stop the ResourceAdapter on context shutdown. This corresponds to 'non-managed' bootstrap in a local environment, according to the JCA 1.7 specification.

This is essentially an adapter for bean-style bootstrapping of a JCA ResourceAdapter, allowing the BootstrapContext or its elements (such as the JCA WorkManager) to be specified through bean properties.

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

Builds the BootstrapContext and starts the ResourceAdapter with it.

destroy

open fun destroy(): Unit

Stops the ResourceAdapter.

getObject

open fun getObject(): ResourceAdapter

getObjectType

open fun getObjectType(): Class<out ResourceAdapter>

isSingleton

open fun isSingleton(): Boolean

setBootstrapContext

open fun setBootstrapContext(bootstrapContext: BootstrapContext): Unit

Specify the JCA BootstrapContext to use for starting the ResourceAdapter.

Alternatively, you can specify the individual parts (such as the JCA WorkManager) as individual references.

setResourceAdapter

open fun setResourceAdapter(resourceAdapter: ResourceAdapter): Unit

Specify the target JCA ResourceAdapter, passed in as configured instance which hasn't been started yet. This will typically happen as an inner bean definition, configuring the ResourceAdapter instance through its vendor-specific bean properties.

setResourceAdapterClass

open fun setResourceAdapterClass(resourceAdapterClass: Class<out ResourceAdapter>): Unit

Specify the target JCA ResourceAdapter as class, to be instantiated with its default configuration.

Alternatively, specify a pre-configured ResourceAdapter instance through the "resourceAdapter" property.

setWorkManager

open fun setWorkManager(workManager: WorkManager): Unit

Specify the JCA WorkManager to use for bootstrapping the ResourceAdapter.

setXaTerminator

open fun setXaTerminator(xaTerminator: XATerminator): Unit

Specify the JCA XATerminator to use for bootstrapping the ResourceAdapter.