I think you have to see the all condition :) 

```(shouldInvokeRemoteTxCommand && !prepareSent)``` makes no sense alone but with the second part, it makes totally sense. 

you are not allowing to send the rollback if ```prepareSent == true``` because you have to take in consideration if it is one phase commit or not. If you are using one phase commit, the rollback is not needed because the prepare will make the transaction cleanup (releasing locks, removing from ```TransactionTable```, etc...)