XA transactions and deferred constraints defines how some XAResource methods behave in conjunction with deferred constraints.

If an application calls XAResource.prepare(Xid), any constraints with a constraint mode of DEFERRED are checked. If there is a violation, throws XAException.XA_RBINTEGRITY, and the XA transaction is rolled back.

If an application calls XAResource.commit(Xid, true) (with true indicating a one-phase commit), any constraints with a constraint mode of DEFERRED are checked. If there is a violation, throws XAException.XA_RBINTEGRITY, and the XA transaction is rolled back.

See and for more information about deferrable constraints.