public interface NonXAResource
The NonXAResource interface defines the contract between a NonXA Resource Manager and a Transaction Manager in a distributed transaction processing (DTP) environment. NonXA participant needs to implement this interface for participating in the global transaction.
Modifier and Type | Method and Description |
---|---|
void |
begin(javax.transaction.xa.Xid xid) |
void |
commit(javax.transaction.xa.Xid xid, byte[] commitRecord)
Informs the Non XA resource manager to commit the local transaction changes
|
boolean |
isSameRM(NonXAResource nxares)
This method is called to determine if the Non XA resource manager instance represented by the target object is the same as the Non XA resouce manager instance represented by the parameter nxares.
|
java.util.List<byte[]> |
recover()
Obtains a list of commit records persisted by the NonXaResource manager
|
void |
rollback(javax.transaction.xa.Xid xid)
Informs the Non XA resource manager to roll back the local transaction
|
void begin(javax.transaction.xa.Xid xid) throws NonXAException
NonXAException
void commit(javax.transaction.xa.Xid xid, byte[] commitRecord) throws NonXAException
xid
- A global transaction identifiercommitRecord
- Transaction commit record to be persisted at the Non XA resource end. It needs to be retuened as part fo recovery callNonXAException
- An error has occurred.void rollback(javax.transaction.xa.Xid xid) throws NonXAException
xid
- A global transaction identifier.NonXAException
- An error has occurred.java.util.List<byte[]> recover() throws NonXAException
NonXAException
- An error has occurred.boolean isSameRM(NonXAResource nxares) throws NonXAException
nxares
- An NonXAResource object whose resource manager instance is to be compared with the resource manager instance of the target object.NonXAException
- An error has occurred.Copyright © 2022, Oracle and/or its affiliates.