@ConsumerType public interface RecoverableXAResource
RecoverableXAResourceservice may be provided by a
ResourceProviderif they are able to support XA recovery operations. There are two main sorts of recovery:
- Recovery after a remote failure, where the local transaction manager runs throughout
- Recovery after a local failure, where the transaction manager replays in-doubt transactions from its log
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.
Method SummaryModifier and TypeMethodDescription
getId()Get the id of this resource.Get a new, valid XAResource that can be used in recovery This XAResource will be returned later using the
voidRelease the XAResource that has been used for recovery
getIdString getId()Get the id of this resource. This should be unique, and persist between restarts
- an identifier, never
getXAResourceGet a new, valid XAResource that can be used in recovery This XAResource will be returned later using the
- a valid, connected, XAResource
Exception- If it is not possible to acquire a valid XAResource at the current time, for example if the database is temporarily unavailable.
(XAResource xaRes)Release the XAResource that has been used for recovery