Package org.wildfly.transaction.client
Class XAResourceRegistry
- java.lang.Object
-
- org.wildfly.transaction.client.XAResourceRegistry
-
public abstract class XAResourceRegistry extends Object
Registry that keeps track of outflowed resources info for a specific transaction. Used for recovery of those resources when they enter in doubt state.- Author:
- Flavia Rainone
-
-
Constructor Summary
Constructors Constructor Description XAResourceRegistry()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddResource(XAResource resource, Xid xid, URI uri)Adds a XA resource to this registry.protected XAResourcereloadInDoubtResource(URI uri, String nodeName, Xid xid)Reloads an in doubt resource, recreating a previously lost remote XA resource object.protected abstract voidremoveResource(XAResource resource)Removes a XA resource from this registry.protected abstract voidresourceInDoubt(XAResource resource)Flags the previously added resource as in doubt, meaning that it failed to complete prepare, rollback or commit.
-
-
-
Method Detail
-
addResource
protected abstract void addResource(XAResource resource, Xid xid, URI uri) throws SystemException
Adds a XA resource to this registry.- Parameters:
resource- the resourceuri- the resource URI location- Throws:
SystemException- if there is a problem recording this resource
-
removeResource
protected abstract void removeResource(XAResource resource) throws XAException
Removes a XA resource from this registry.- Parameters:
resource- the resource- Throws:
XAException- if there is a problem deleting this resource
-
resourceInDoubt
protected abstract void resourceInDoubt(XAResource resource)
Flags the previously added resource as in doubt, meaning that it failed to complete prepare, rollback or commit. It can be invoked more than once for the same resource if that resource repeatedly fails to perform those operations, such as a resource that first fails to prepare, and then fails to rollback.- Parameters:
resource- the resource
-
reloadInDoubtResource
protected XAResource reloadInDoubtResource(URI uri, String nodeName, Xid xid)
Reloads an in doubt resource, recreating a previously lost remote XA resource object. This method must be invoked to recreate in doubt resources after a server shutdown or crash.- Parameters:
uri- the URI where the outflowed resource is locatednodeName- the node name of the resource- Returns:
- a newly-created resource representing a previously lost XA resource that is in doubt
-
-