1. A computer program product for recovery of a two-phase commit transaction, the computer program product comprising: a computer readable storage medium and program instructions stored on the computer readable storage medium, the program instructions comprising: program instructions to transmit a first transaction identifier to a data store, wherein the first transaction identifier defines a two-phase commit; program instructions to transmit a prepare command for the first transaction identifier to a first resource manager; program instructions to determine if a failure and restart occurred within a distributed data processing environment, wherein the failure and restart occurs after the first resource manager receives an end command, but prior to completing execution of the prepare command for the first transaction identifier; program instructions to respond to a determination that the failure and restart did occur within the distributed data processing environment by retrieving the first transaction identifier from the data store; and program instructions to transmit a rollback command for the retrieved first transaction identifier to the first resource manager.