Javadoc
The transaction is committed by the commit method. This will execute
the PhaseZero, 2PC and OutcomeNotification protocols prior to returning.
If there is no transaction associated with the invoking thread then
WrongStateException is thrown. If the coordinator is not aware of the
current transaction UnknownTransactionException is thrown. If the transaction
ultimately rolls back then the TransactionRolledBackException is thrown.
If any other error occurs a SystemException is thrown. When complete, this
operation disassociates the transaction from the current thread such that
it becomes associated with no transaction.