January 2019
Beginner to intermediate
352 pages
8h
English
In the compensate phase, the LRA coordinator invokes the method annotated with @Compensate and performs the business operations needed to make the business operation consistent, in terms of the data status after a condition that determines the operation as failed.
In our scenario, the method will set the status of the offer to "REFUSED" and the status of the football player to "Free". We have decided to set "Free" and not null, in order to show that the record is updated by a method invoked by the LRA coordinator.
The following code is required to do so:
/** * LRA compensate method: it sets the final status of the football player offer * and football player based on a failed response of the send offer method. * * @param ...
Read now
Unlock full access