commitPrepared method
xa_commit (Phase 2): finalise a prepared branch.
Implementation
bool commitPrepared() {
final rc = _backend.xaCommitPrepared(xaId);
if (rc == 0) {
_state = XaState.committed;
return true;
}
// Branch is still Prepared at the RM — use failedAfterPrepare so cleanup
// callers know to invoke rollbackPrepared(), not rollback().
_state = XaState.failedAfterPrepare;
return false;
}