public class JmsResourceAdapter extends Object implements ResourceAdapter
Constructor and Description |
---|
JmsResourceAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
endpointActivation(MessageEndpointFactory endpointFactory,
ActivationSpec spec)
This is called during the activation of a message endpoint.
|
void |
endpointDeactivation(MessageEndpointFactory endpointFactory,
ActivationSpec spec)
This is called when a message endpoint is deactivated.
|
boolean |
equals(Object other) |
WorkManager |
getWorkManager()
Get the work manager
|
XAResource[] |
getXAResources(ActivationSpec[] specs)
This method is called by the application server during crash recovery.
|
int |
hashCode() |
void |
start(BootstrapContext ctx)
This is called when a resource adapter instance is bootstrapped.
|
void |
stop()
This is called when a resource adapter instance is undeployed or
during application server shutdown.
|
public WorkManager getWorkManager()
public void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec) throws ResourceException
ResourceAdapter
Endpoint activation is deemed successful only when this method completes successfully without throwing any exceptions.
endpointActivation
in interface ResourceAdapter
endpointFactory
- a message endpoint factory instance.spec
- an activation spec JavaBean instance.ResourceException
- Thrown if an error occursNotSupportedException
- indicates message endpoint
activation rejection due to incorrect activation
setup information.public void endpointDeactivation(MessageEndpointFactory endpointFactory, ActivationSpec spec)
ResourceAdapter
Any exception thrown by this method is ignored. After this method call, the endpoint is deemed inactive.
endpointDeactivation
in interface ResourceAdapter
endpointFactory
- a message endpoint factory instance.spec
- an activation spec JavaBean instance.public XAResource[] getXAResources(ActivationSpec[] specs) throws ResourceException
ResourceAdapter
ActivationSpec
JavaBeans
and returns an array of XAResource
objects each of which
represents a unique resource manager.
The resource adapter may return null if it does not implement the
XAResource
interface. Otherwise, it must return an array
of XAResource
objects, each of which represents a unique
resource manager that was used by the endpoint applications.
The application server uses the XAResource
objects to
query each resource manager for a list of in-doubt transactions.
It then completes each pending transaction by sending the commit
decision to the participating resource managers.getXAResources
in interface ResourceAdapter
specs
- an array of ActivationSpec
JavaBeans each of
which corresponds to an deployed endpoint application that was
active prior to the system crash.XAResource
objects each of which
represents a unique resource manager.ResourceException
- generic exception if operation fails due to an
error condition.public void start(BootstrapContext ctx) throws ResourceAdapterInternalException
ResourceAdapter
During this method call a ResourceAdapter JavaBean is responsible for initializing the resource adapter instance. Any exception thrown during this method call causes the application server to abort the bootstrap procedure for this specific resource adapter instance.
start
in interface ResourceAdapter
ctx
- a bootstrap context containing references to
useful facilities that could be used by a resource adapter instance.ResourceAdapterInternalException
- indicates bootstrap failure.
The resource adapter instance is unusable and must be discarded.public void stop()
ResourceAdapter
During this method call, a ResourceAdapter JavaBean is responsible for performing an orderly shutdown of the resource adapter instance. Any exception thrown by this method call does not alter the processing of the application server shutdown or resource adapter undeployment that caused this method call. The application server may log the exception information for error reporting purposes.
stop
in interface ResourceAdapter
Copyright © 2018 JBoss by Red Hat. All rights reserved.