@ConsumerType public interface RecoverableXAResource
RecoverableXAResource
service may be provided by a
ResourceProvider
if they are able to support XA recovery
operations.
There are two main sorts of recovery:
getId()
provides a persistent name
that can be used to correlate usage of the resource both before and after
failure. This identifier must also be passed to
TransactionContext.registerXAResource(XAResource, String)
each time
the recoverable resource is used.Modifier and Type | Field and Description |
---|---|
static String |
OSGI_RECOVERY_ENABLED
This service property key is used by
TransactionControl services
and ResourceProvider factories to indicate that they can support
transaction recovery. |
Modifier and Type | Method and Description |
---|---|
String |
getId()
Get the id of this resource.
|
XAResource |
getXAResource()
Get a new, valid XAResource that can be used in recovery
This XAResource will be returned later using the
releaseXAResource(XAResource) method |
void |
releaseXAResource(XAResource xaRes)
Release the XAResource that has been used for recovery
|
static final String OSGI_RECOVERY_ENABLED
TransactionControl
services
and ResourceProvider
factories to indicate that they can support
transaction recovery.String getId()
null
XAResource getXAResource() throws Exception
releaseXAResource(XAResource)
methodException
- If it is not possible to acquire a valid
XAResource at the current time, for example if the database
is temporarily unavailable.void releaseXAResource(XAResource xaRes)
xaRes
- An XAResource
previously returned
by getXAResource()
Copyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0