org.springframework.beans.factory.FactoryBean that bootstraps
the specified JCA 1.7 jakarta.resource.spi.ResourceAdapter ,
starting it with a local jakarta.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.
setResourceAdapter, setBootstrapContext, setWorkManager, jakarta.resource.spi.ResourceAdapter#start(jakarta.resource.spi.BootstrapContext) , jakarta.resource.spi.ResourceAdapter#stop()
| Modifier and Type | Field and Description |
|---|---|
| private BootstrapContext | |
| private ResourceAdapter | |
| private WorkManager | |
| private XATerminator |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Builds the BootstrapContext and starts the ResourceAdapter with it. |
| public void | destroy()
Implements org. Stops the ResourceAdapter. |
| public ResourceAdapter | getObject()
Implements org. Return an instance (possibly shared or independent) of the object managed by this factory. |
| public Class | getObjectType()
Implements org. Return the type of object that this FactoryBean creates,
or |
| public boolean | isSingleton()
Overrides default org. Is the object managed by this factory a singleton? |
| public void | setBootstrapContext(BootstrapContext bootstrapContext)
Specify the JCA BootstrapContext to use for starting the ResourceAdapter. |
| public void | setResourceAdapter(ResourceAdapter resourceAdapter)
Specify the target JCA ResourceAdapter, passed in as configured instance which hasn't been started yet. |
| public void | setResourceAdapterClass(Class<? extends ResourceAdapter> resourceAdapterClass)
Specify the target JCA ResourceAdapter as class, to be instantiated with its default configuration. |
| public void | setWorkManager(WorkManager workManager)
Specify the JCA WorkManager to use for bootstrapping the ResourceAdapter. |
| public void | setXaTerminator(XATerminator xaTerminator)
Specify the JCA XATerminator to use for bootstrapping the ResourceAdapter. |
| bootstrapContext | back to summary |
|---|---|
| private BootstrapContext bootstrapContext
| |
| resourceAdapter | back to summary |
|---|---|
| private ResourceAdapter resourceAdapter
| |
| workManager | back to summary |
|---|---|
| private WorkManager workManager
| |
| xaTerminator | back to summary |
|---|---|
| private XATerminator xaTerminator
| |
| ResourceAdapterFactoryBean | back to summary |
|---|---|
| public ResourceAdapterFactoryBean() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws ResourceException Implements org. Builds the BootstrapContext and starts the ResourceAdapter with it. | |
| destroy | back to summary |
|---|---|
| public void destroy() Implements org. Stops the ResourceAdapter.
| |
| getObject | back to summary |
|---|---|
| public ResourceAdapter getObject() Implements org. Doc from org. Return an instance (possibly shared or independent) of the object managed by this factory. As with a If this FactoryBean is not fully initialized yet at the time of
the call (for example because it is involved in a circular reference),
throw a corresponding As of Spring 2.0, FactoryBeans are allowed to return
| |
| getObjectType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Return the type of object that this FactoryBean creates,
or This allows one to check for specific types of beans without instantiating objects, for example on autowiring. In the case of implementations that are creating a singleton object, this method should try to avoid singleton creation as far as possible; it should rather estimate the type in advance. For prototypes, returning a meaningful type here is advisable too. This method can be called before this FactoryBean has been fully initialized. It must not rely on state created during initialization; of course, it can still use such state if available. Note Autowiring will simply ignore FactoryBeans that return
| |
| isSingleton | back to summary |
|---|---|
| public boolean isSingleton() Overrides default org. Doc from org. Is the object managed by this factory a singleton? That is,
will Note If a FactoryBean indicates to hold a singleton object,
the object returned from The singleton status of the FactoryBean itself will generally be provided by the owning BeanFactory; usually, it has to be defined as singleton there. Note This method returning The default implementation returns
| |
| setBootstrapContext | back to summary |
|---|---|
| public void setBootstrapContext(BootstrapContext bootstrapContext) 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 | back to summary |
|---|---|
| public void setResourceAdapter(ResourceAdapter resourceAdapter) 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 | back to summary |
|---|---|
| public void setResourceAdapterClass(Class<? extends ResourceAdapter> resourceAdapterClass) 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 | back to summary |
|---|---|
| public void setWorkManager(WorkManager workManager) Specify the JCA WorkManager to use for bootstrapping the ResourceAdapter.
| |
| setXaTerminator | back to summary |
|---|---|
| public void setXaTerminator(XATerminator xaTerminator) Specify the JCA XATerminator to use for bootstrapping the ResourceAdapter.
| |