ABC Travel offers a night reservation service, exposed as a web service. XYZ Stays offers
a hotel reservation service, also exposed as a web service. ABC and XYZ will not change
their web service. A startup company has contacted you for advice about designing a new
service that combines flight and hotel reservations, which they will offer as a web service.
The startup company plans to provide their service by implementing a portable Java EE
solution that aggregates the two services offered by ABC Travel and XYZ Stays, a
combined reservation succeeded. Only if both the flight reservation and the hotel
reservation succeed Which is the most effective way to meet the business requirement?
A.
The startup company should implement their new service as a web service that uses an
XA transaction manager.
B.
The startup company cannot implement their new service as a web service, but must use
an enterprise JavaBean (EJB) component to gain transaction propagation.
C.
The startup company should implement their new service as a web service by calling the
two existing services, and implementing their own compensating transaction.
D.
The startup company can implement their new service as a web service by calling the
two existing services in a single transaction, relying on transaction propagation to support
this business rule.
C is correct answer.
https://en.wikipedia.org/wiki/Compensating_transaction